Author Archives: zephyr

Encryption with eCryptfs on Linux

Introduction

eCryptfs is a POSIX-compliant enterprise cryptographic "stacked" filesystem for Linux. Please note that eCryptfs is not a partition/ disk encryption subsystem like "Veracrypt".

eCryptfs is a stacked filesystem that can be mounted on any directory and on top of the main file system.

Using eCryptfs, we can easily create an encrypted directory to store confidential data and mount it on any directory. Although it is good practice for the mount path to match the path of the underlying file system.

No separate partition or pre-allocated space is actually required. eCryptfs should work well on local filesystems such as EXT3, EXT4, XFS, JFS and ReiserFS etc.

eCryptfs also supports networked filesystems such as NFS, CIFS, Samba and WebDAV, but not does not have full functionality as it was designed to work with local filesystems.

It stores the cryptographic metadata in the headers of files, so the encrypted data can be easily moved between different users and even systems. eCryptfs has been included in Linux Kernel since version 2.6.19.

Installation

I have only tested it on Ubuntu 18.04 which runs on the 5.4.0-87-generic kernel obtained by running

$ uname -r

5.4.0-87-generic

To enable an utilize Ecryptfs install ecryptfs-utils

$ sudo apt install ecryptfs-utils

How to use Ecryptfs

The method below explains how to encrypt a folder called temp2 located at /home/zephyr/temp2

Open terminal and run the following:

$ sudo mount -t ecryptfs /home/zephyr/temp2 /home/zephyr/temp2

Passphrase: ← enter your passphrase

Select cipher:

1) aes: blocksize = 16; min keysize = 16; max keysize = 32

2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56

3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24

4) twofish: blocksize = 16; min keysize = 16; max keysize = 32

5) cast6: blocksize = 16; min keysize = 16; max keysize = 32

6) cast5: blocksize = 8; min keysize = 5; max keysize = 16

Selection [aes]: 1 ← selected

Select key bytes:

1) 16

2) 32

3) 24

Selection [16]: 1 ← selected

Enable plaintext passthrough (y/n) [n]: n ← selected

Enable filename encryption (y/n) [n]: n ← selected

Attempting to mount with the following options:

ecryptfs_unlink_sigs

ecryptfs_key_bytes=16

ecryptfs_cipher=aes

ecryptfs_sig=015fa84ce5a1043d

Mounted eCryptfs

temp2 is now and encrypted folder. Any files and folders moved into it or created in it, will be automatically encrypted.

It is very important to remember your passphrase to be able to access your eCryptfs encrypted files and folders. It is also advisable to make note of your encryption settings for future mounting/access of your encrypted file/directory. Choose a password of 14 characters long made up of 3 random words. This is easier to remember and still secure. You can add symbols and numbers to it increase the strength of the passphrase.

A signature file named "sig-cache.txt" will be created under "/root/.ecryptfs/" directory. This file is used to identify the mount passphrase in the kernel keyring. It is a read only file except for the root user. I suggest saving a copy with a .bak extension as the signature number for each encrypted and mounted folder. It is a good reference to have.

Accessing your encrypted data.

Each time you reboot your system the encrypted volume will be dismounted and you will not be able to access your encrypted data.

To access your data you have to remount the encrypted volume with:

$ sudo mount -t ecryptfs /home/zephyr/temp2 /home/zephyr/temp2

After which Terminal pops up prompting you for your passphrase

passphrase to be entered in Gnome Terminal to access folders(files/ encrypted with ecryprtfs. Zephyr Rodrigues, Belmonte, Luz de Tavira, Portugal
type in your passphrase

The problem with this is that you have to enter all the encryption options each time.

Automating the mount process

My solution to this is make an executable .sh file with a text editor. I use the default, gnome, gedit text editor

In this example, I have called it mount_temp2.sh

Paste the following code into it. Use whatever options you chose when you encrypted the file/folder.

#!/bin/bash $ sudo mount -t ecryptfs -o ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=no /home/zephyr/temp2 /home/zephyr/temp2

Save mount_temp2.sh

Right click, on the file in File Manager, go to the Permissions tab and tick the box “Allow executing file as a program”

Ubuntu 18.04, File Manager, Make executable, Zephyr Rodrigues, Belmonte, Luz de Tavira, Algarve , Portugal

Next with your Text Editor, create a new executable file.
Call it run_mount_temp2.sh for example.
Paste the following code into it.

#!/bin/bash #start terminal and mount encrypted temp2 folder gnome- terminal -- sh -c './mount_temp2.sh'

Make it executable as described previously. Now when you start your system, simply double click on

run_mount_temp2.sh

this it will call Terminal and prompt you to enter your passphrase. After entering the correct passphrase you will be granted full access to your encrypted folder and files within.

Automating the dismount process

You can dismount (unmount) your encrypted folder at any time to make it inaccessible. By default

to unmount an encrypted drive manually, open Terminal an run

sudo umount /path/to encrypted/folder

so, in my test case it is

sudo umount /home/zephyr/temp2

To Automate unmount/dismount:

Create an executable file (refer to ‘Automating the mount process’ for the steps) called

unmount_temp2.sh and in it enter the following code. Paths and folders should match your own.

#!/bin/bash sudo umount /home/zephyr/Documents echo "Dismounting Documents folder.."; sleep 5;

Next create the run file that will open Terminal and run the previous created executable.

Create an executable file called run_unmount_temp2.sh

Enter the following code into it:

#!/bin/bash #start terminal and unmount encrypted temp2 folder gnome-terminal -- sh -c './unmount_temp2.sh'

Double clicking on run_unmount_temp2.sh will run Terminal and execute the command to unmount the encrypted folder

Notes on Automation

All the automation files should be in the same folder/directory

The folder/directory containing the automation files should not be encrypted.

Creating an encrypted folder on a USB drive

On your Linux machine format a USB stick with ext4 file system. The USB stick will only be accessible to machines with Linux operating systems.

In this example I have given the USB stick a Volume Label called “SECRET”.

Whenever you plug in this USB stick it will be mounted as “SECRET” by the operating system.

Next create a folder on “SECRET”. I called mine temp3.

Next mount and encrypt the temp3 folder by running the following command in Terminal. The path name should start with media/home directory name/usb volume name on a standard Ubuntu 18.04 install.

$ sudo mount -t ecryptfs /media/zephyr/SECRET/temp3 /media/zephyr/SECRET/temp3

The steps to automate are the same as described earlier on.

Note: Verify the volume name for the usb that you use in your scripts is correct and matches the one shown in Terminal when you type df .

In Conclusion

To further automate the mount process you could utilize the Startup Applications Preferences app

Start Program App to start ecryptfs .sh type executables at computer startup. Ubuntu 18.04
Start Program App

which comes pre-installed on Ubuntu 18.04 . This allows configuring applications to run automatically when logging in to your desktop. So just add the run_mount_temp2.sh example to the list of startup apps.

In the Command: field you need to enter bash U% followed by the path to your .sh executable.

bash %U /path/to/file/run_mount_temp2.sh

Alternatively you can create a .desktop file in /home/your home directory/.config/autostart . So for example mount_documents.desktop with the following code in it.

[Desktop Entry]
Type=Application
Exec= bash %U /home/zephyr/Desktop/batch/ecryptfs_batch/ecryptfs_mount_Documents.sh
Terminal=true
Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[en_GB]=mount-documents.desktop Comment[en_GB]="mount encrypted Documents"

One quirk I noticed is that ecryptfs will allow you to carry on mounting your encrypted volume with an incorrect passphrase and proceed to create a new signature for it but you won’t be able to access your encrypted files and folders. Ecryptfs does warn you first that the passphrase you have entered maybe be incorrect and do you want to proceed with the mount. Best to abort if you are unsure about the passphrase you entered.

All in all , I think ecryptfs is a robust , fast and very flexible file encryption system.

Source Reference:

September 2021- autumn underway

Bougainvillea,Win turbine, Renewable Energy, Algarve, Portugal
Bougainvillea and Wind Power -my renewable energy dreams are still very valid .

Night time temperatures have begun to fall, definitely a sign of the onset of autumn.

Still haven’t fired up the stove as it’s still above eighteen indoors during the night.

I haven’t been doing much outside the past month and a half. Been busy doing a PHP certification course as well as learning javascript and such. Needs must etc.

Gathered and sold my own carobs and those of a friend. I don’t mind picking carobs, carobs, Belmonte, Luz de Tavira, Algarveit’s easy enough to do. Almonds are another matter. A mixed blessing as this year’s almond harvest is looking to be poor. Almonds are great chopped up and added to your oatmeal porridge. I also throw in some chopped or grated seasonal fruit I have to hand. Like apples, plums, peaches, pears etc. The dogs love this too.

Picking almonds

My own carob harvest was poor this year. About half but what I had last year but I really didn’t mind. Transportation for me is a still an issue. Something I haven't managed to resolve.

figs, Tavira, algarve, Portugak, Lampa Preta varidade
Lampa Preta variety of figs

I have had a decent amount of fruit this season. The plums were very good. Early June right upto mid September. I think I picked the last of the Santa Rosa variety today. I have had some decent peaches , a good number of nashi pears and a few melons.

At the moment I got some Persimmon (kaki) trickling through. They are delicious when properly ripe. I also had my first figs. Lampa preta (black lantern) . I had planted this way back in 2016. It finally managed to grow and is a properly established tree now.

melĂŁo, melon, Belmonte, Luz de Tavira, Zephyr Rodrigues, Sustainable Living, Renewable Energy
Melons

I have snd have had , a fair amount of grapes for the table. I have 4 fruits vines at the moment. 1 red (Italia) and three white (Dona Maria Branca).

My first grow bed is working very well.I have lettuce, beetroot and sweet potato growing in it. As well as the edible weed purslane.

Uvas, Grapes, Dona Maria Branca, Belmonte, Luz de Tavira, Ria Formosa, Algarve.
Grapes, Dona Maria Branca

I have not been cockling much. The new inflatable was cleverly punctured. There are some very dodgy foreigners about. It was busy where I had to make land and they were waiting for me to come in. They came with their dogs too. Poor Bonji was kept occupied. I left craft and Bonji unattended for less than a 5 minutes. I will be more careful next time.

Well that’s all for now! It pruning and the olive harvest next.

Early Summer 2021

Has been rather busy. I have been kept occupied with land management, prep-ping for a programming certification and the three dogs.

Land management is mainly irrigation now. Everything is turning dry. I am doing a bit of pruning here and there as well as cutting the grass as it pops up. It’s mainly clear so I don’t have to bust a gut. My motorised scythe has broken down again. The Bosch electric strimmer on the other hand works fantastic. The handle parted at the weld joint. I don’t know any welder here so I think I will have to try some nuts and bolts.

Plums, Algarve, Portugal

Been trying to grow a few vegetables. Bought a dozen salad tomato seedlings – 9 have survived the attention of the dogs and snails. I have this year a few melon plants grown from seed. They are of the tennis ball size variety.

The two new canine additions, Chubbs and Conan are a handful but adorable. They are water dogs and love splashing about in the Ria Formosa. It’s a bit more difficult to take them to a nice beachy area as my kayak was stolen. Some people here obviously didn’t want me having fun on the sandbar catching cockles. I got an inflatable kayak to serve in it’s stead. It’s a cheap and cheerful Intex Explorer K2.

Intex Explorer K2 kayak - great value for money!

It is however very difficult to row. And unsuitable for boisterous young dogs with sharp claws. Their mother,Bonji on the other hand is fine in it. I am working on a plan to fit an electric trawling motor. Another option I am toying with is poling along the shallows. But it hasn’t got a solid floor that would support one standing. I have wrapped a tarpaulin around it so that I can drag it over ground - for just a little way 🙂

I had a good amount of apricots but lost about 70% of them to worms. I currently have a decent about of plums. I have – by luck - varieties that ripen at different times. So it’s been plum juice, plum cake and plum compote. The trees were ,and still are ,infected by a tiny white fly whose larvae eat up the leaves. and I think, the fly damages the fruit. I sprayed them thrice this year with some pesticide which saved the leaves and ensured a decent crop of plums. No ideal but necessary. Speaking of cakes,if you are in the supermarkets around here you must try the cake Folar de Erva Doce. It's not much to look at but melts in your mouth. It's sort of a sponge cake. 400g at under €3, It's goes down very well with the afternoon cup of tea.

Folar de Erva Doce

.

My Almond toffee. Made this afternoon 30/06/2021. And very good it is too 🙂

I have built my first grow bed. 🙂 I have just sown spinach and put in some sweet potato cuttings.

My solar power dreams are still alive and well. Besides running the 1000W Bosch strimmer I can also boil hot water in a 800W 0.5 litre electric kettle – during the day. Not at night as it would quickly run down my small battery bank. My solar array is quite small 720W at 24V. It is adequate for my current needs and works well. I am not sure if the law has changed. Back in 2014 you were permitted a solar array of a maximum of 1500W output for self consumption.

Ufesa 800W electric kettle

That’s all for tonight 🙂

Who is keeping your Android company?

Android Vulnerability, BlueFrag

Let's start with BlueFrag

This is a critical security issue allows a malicious entity to silently log onto your phone via bluetooth . “This vulnerability can lead to theft of personal data and could potentially be used to spread malware ” (TechSecurity, 2020). This vulnerability affects Android versions 4.2, 6.0.1, 7.0 and 8.0. If you are on a version that is older than 3 years you will not receive any security patches from Google.

How to reduce the risk of a BlueFrag vulnerability on older versions .

Since there aren’t any software patches what you can do is to keep your bluetooth connection turned off when not in use and not to make your phone is not discoverable via bluetooth.

The danger of running unsupported Android OS versions is high.

The current Android version is 10 but there are a lot of phones (millions!) running older versions which are no longer supported by Android and hence not patched for vulnerabilities. I have a phone with such an older android operating system v4.2 KitKat) and I am sure it has been hacked and the apps infected by malware. It has come to my attention many apps on it have every permission under the sun and even if you force stop them, they restart on reboot. BlueFrag is just one vulnerability. There are a host of malware apps that can be downloaded from the Google’s PlayStore including ones that can steal payments information and other personal information. To my mind Google takes a flexible view on security policy when it comes to safeguarding users’ personal data. Google have only committed to 3 year support plan for each version release. So you should consider this if you are in the market for a second hand phone.

What’s to be done if you are on a older OS?

Ditch phones with older versions. Personally I wouldn’t run anything older that v6.0 (Marshmellow) which has more strict settings to what permissions an app is granted. On v6.0 apps have to be granted permissions explicitly by the user to access sub systems on your phone. Of’course this requires knowledge by the user to know which permissions to allow or deny an app when prompted.

If you have the ability you can use ADB (Android Debug Bridge ) utility to remove bloatware apps from your phone and generally manage what is on your phone, in a better way.

More is less.

Be very careful with which apps you install. Just because an app (application) is available from Google Play for download does not mean that it is secure or that it will be secure in the future. Carefully check which permissions an app is requesting and has been granted. See this in your Settings -→ Apps.

Good luck everyone – remember to think twice 🙂

References:

https://techsecurity.news/2020/02/bluefrag-critical-bluetooth-vulnerability-in-android-cve-2020-0022/

thtps://www.cvedetails.com/vulnerability-list.php?vendor_id=1224&product_id=19997&version_id=188440&page=1&hasexp=0&opdos=0&opec=0&opov=0&opcsrf=0&opgpriv=0&opsqli=0&opxss=0&opdirt=0&opmemc=0&ophttprs=0&opbyp=0&opfileinc=0&opginf=0&cvssscoremin=0&cvssscoremax=0&year=0&cweid=0&order=1&trc=772&sha=cc989d75eb9a930c55694358f687a94f77858134h

GoAccess -a fab tool for quick Web Analysis on Linux

I was looking for linux Web Analysis tools and came across GoAccess. I found it’s recommended on a cybercitibiz site (Gite,2021).

On Linux Ubuntu 18.04 you can install it from the debian repository. Open Terminal and type

sudo install goaccess

This will run the install script and install goaccess on your system. To get help type

goaccess –help

To do something useful you need to point it at a web server log file. I am using a LAMP configuration for my test web server (Linux Apache MySql and PHP) . The log files here are located at /var/log/apache2/access.log where access.log is the name of the log file. If you have virtual hosts running you may have setup separate log files for each virtual host which is a good idea.

You can download remote web server log files to your local linux and view them in the goacess application.

To view the log file in goaccess run

goaccess -f/path/to/logfile/access.log

example: goaccess -f/var/log/apache2/access.log

Note: If any of your directory names contains a space or spaces enclose it in quotes or goaccess will encounter a parsing error.

The following screen should come up.

GoAccess initial selection screen- GoAccess is a light weight web traffic analysis Terminal tool for Linux

Pressing enter gives you the Analysis view shown below.

GoAccess Analysis of log file from a web server

I think it is an excellent tool for giving you some idea quickly, on what’s happening on your web site.

In my February log file snapshot, you can see that I had 3748 unique visitors and unfortunately no referrals (referrers). Referrals are when visitors come to your site through a link of your website on another site.

I think it is an really excellent tool! It’s small in size, just over 2Mb and easy on processor resources. And you don’t have to pass your or your client’s data to a third party like Google. Having mentioned Google , there is Google Analytics which is a full blown web analytics application. It is free. The down side is google have access all your web server traffic and activity.

There are Open Source Web Analytics alternatives which I am going to look into but for the moment I am happy with just GoAccess.

Sources: 7 Awesome Open Source Analytics Software For Linux and Unix - nixCraft , https://goaccess.io/

Picked Olives, Belmonte, Luz de Tavira, Algarve, Portugal, small holding, defender of - my meu girrasol creed :)

January

Is all but over. Weatherwise we have had a couple of cold weeks where you had frost and frozen pipes. But is has warmed up this week and some of the almonds have bloomed. It been a mixture of sunshine together with cloud cover and light rain.

almond trees, Belmonte, Luz de Tavira, Algarve

LE300 wind turbine from Leading Edge, AlgarveThe little LE300 wind turbine has been helping keep the lights on during periods of poor insolation. I have been pruning my own trees around the property. I have been taking my time with this. It’s going well and I am not going anywhere. I had my first avocado thus year. Of the Hass' variety. Organic avocados, Hass variety, Algarve, Portugal

.fico em casa , over here , Algarve, Portugal oruned olive trees, Belmonte, Luz de Tavira, Algarve, Portugal

I have been experimenting with making cookies. The almond and lemon ones turned out decent. There weren’t many olives to be had last year but I managed to pick a few for pickling from the Belgian neighbours’ trees. Picked Olives, Belmonte, Luz de Tavira, Algarve, Portugal, small holding, defender of - my meu girrasol creed :)

I currently have 5 dogs in the house. True four are still only puppies but they are driving me insane. 🙂 I really hope I can find good owners for them and soon.

organic farming, sweet potato, Algarve, Portugal, real transition lifestyle
Another first for me. 1 kg of sweet potato. Grown in a large pot. The ones in the ground didn't do well in the heavy clay soil.

Text to Speech

Cold January days so more time for reading, Due to my particular situation I can’t read books. As you can see I can read and write quite well well on the computer using standard ‘Accessibility’ tools and by improvising using different font/illumination settings.

Google-text-to-speech engine and a good read, the war on horror

I recently discovered Google Play books on my Android smartphone. It can use the Google text to speech engine which surprising works offline and works rather well. I ‘read’ “The War on Horror” which I found to be quite a good read. This is a free ebook. Brits would feel equally at home with the various themes explicitly presented or alluded to in this book. It brought back to the fore of my mind how we usually manage to achieve just mediocrity when aiming for excellence. If we started out aiming for just mediocrity the results are guaranteed to be dire.

Evie ebook Reader and Google Play Books on Android smartphones

I discovered an excellent ebook reader on the Android Download store, Google Play. The name of the application is Evie. It is a really good ebook reader! It has style and elegance and superb functionality. I am not sure who the creators/developers are but well done to them!

Evie, ebook reader for Android devices
Screenshot of Evie on my smartphone

Evie can use various text-to-speech engines including Google’s text-to-speech engine which surprisingly works offline. The voice of Brian (British english) is rather good. I use it to read .pdf books from my former degree courses, and technical manuals amongst other ebooks. You can change the engine. Amazon has gone the 100% cloud way. Their text-to-speech engine, Amazon Poly works only when you are connected to the internet. There are other text-to-speech engines that work offline. You can download and use these with Evie. Most of these require to be purchased but many offer a try-before-you-buy option.

Installing Linux with Persistence on a USB stick

This was covered by myself in this previous article when I first ventured into the world of Linux and Ubuntu.

I have learned some new things now and this is a follow up to correct some inaccuracies. Firstly, you should not install Linux on any FAT file system including FAT32 as these file systems don't work correctly with linux file permissions.

Choose a partition size greater than 6GB preferably 10GB minimum for the primary partition which will contain the linux OS files and boot loader. Create a 4GB linux-swap partition as previously. Choose the ext4 journaling file system for the primary partition.

Ubuntu 18.04 partitioned with G-Parted

During installation I made a mistake and installed the ext2 file system which is a legacy linux file system and does not support journaling. A Journaling file system verifies the state of a file during the copy/move process by keeping logs. If a power outage occurred during the file copy process the system would know about it and inform the user that the file was not transferred/saved successfully. There is no such tracking with a non journaling file system and the corrupted file would be saved as a valid entry. I will have to see if I can convert from ext2 to ext4 without having to re-install.

Ubuntu 18.04 installation ext2 primary partition

The rest of the installation procedure for a portable Ubuntu linux 18.04 is still valid.

References: LinuxFilesystemsExplained - Community Help Wiki

Share your Smartphone internet – Bluetooth

I decided to invest in a Bluetooth dongle to help me access the internet on my desktop etc via my smartphone. Why, I think is more secure in being less visible than a Wifi connection.

After having a look around I decided to go for the Plugable USB-bt4le from amazon. This is because it claimed be run on Linux. You can read the review here

And it did! However I had an issue when connecting on an unlocked smartphone that was on the Orange network. This forced me to dig into the world of Android development . It was a baptism of fire. 🙂 I spent and entire day and most of the night learning about Android’s adb (android debug bridge) and the android development environment.

Thanks to Canonical who maintain the software packages for Ubuntu, it is easy to install adb using the apt install adb command in Terminal.

Plagable bluetooth 4.0 on Ubumtu 18.04, Canonical, debian,

After digging around on the internet I found that tethering was set to use DUN and to disable this you had to run

sudo adb shell in Terminal

followed by the statement below after you enter shell in

shell@E####:/ $ settings put global tether_dun_required 0

I think removing the APN for the DUN setting from the mobile phone carrier (on the Orange network in my case) also helped as it seemed to re-enable DUN on reboot.

shell@E####:/ $ settings delete global tether_dun_apn=[ApnSettingV3]Orange Internet,orange.fr,,,orange,orange,,,,,208,01,0,DUN,,,true,0,,,,,,,spn,Orange F

Then reboot.

This did not solve the tethering problem entirely although it prevented the DUN (Dail-up Network)lookup on trying to connect.

What really got it working - Solution to Bluetooth tethering the Smartphone running Android 6.0.1

On your Android Smartphone Go to Settings

Turn on Bluetooth first (ensure you also have an internet connection although this can be done later ). Then

Settings → More → Tethering and Portable Hotspot

then Enable Bluetooth tethering.

And this should work! Unfortunately it seems you have to do this each time you turn Bluetooth on.

Credits:

phpMyAdmin on Ubuntu 18.04

I had phpMyAdmin version 4.6 something running on php 7.2.24 on Ubuntu 18.04 linux.

I checked the version I had by running the following command in Terminal : apt show phpmyadmin

Package: phpmyadmin
Version: 4:4.6.6-5ubuntu0.5
Priority: extra
Section: universe/web
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Thijs Kinkhorst <thijs@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 25.0 MB

I uninstalled the older version of phpMyAdmin via Terminal and running :

sudo apt remove phpmyadmin

These were originally installed from the Debian repository using Terminal and command line when I setup LAMP .

Do not use the autoremove command if you want the current version of php left in place. I also left the old phpMyAdmin database in place. Because I was not sure if it was needed by the new version.

My current php and phpMYAdmin versions are as shown in the image below

phpMyAdmin error - Warning in ./libraries/sql.lib.php#613

You can refer to this article here. phpMyAdmin never worked properly. When accessing tables in databases I got the following type error.

Warning in ./libraries/sql.lib.php#613

count(): Parameter must be an array or an object that implements Countable etc
.

After looking at various articles the best solution I think is the one I found at AskUbuntu.com . See the image below.

How to get rid of phpMyAdmin error - Warning in ./libraries/sql.lib.php#613

It is simple and very effective. And exemplifies the portability of phpMyAdmin. The other methods of removing the installed version of phpMyAdmin and installing a newer version look painful and are not guaranteed as the Debian repository may not have the latest version or version compatible with your current Php version.

Method:

  • Go to the phpMyAdmin website. Download the latest version in zip format (5.0.4 at the time of writing). Copy the hash number as well. This will enable you to verify the integrity of the downloaded file.
  • Verify the hash number. To do this, open Terminal, supply the path where the zip file has been downloaded and type sha256sum filename.zip . Verify the hash number is the same as that supplied by the phpMyAdmin download site. See image below.
  • Unzip the file.
  • Copy the unzipped folder and all it’s contents to your public folder. On Ubuntu 18.04 running Apache 2.4.29 this is in ‘/var/html’ . You can renamed to folder to something shorter if you like.
  • Make a copy of config.sample.inc.php and rename it to config.inc.php.
  • Edit config.inc.php

Make sure you have the authentication part setup correctly as follows to use a cookie and your web server is correctly specified in host.

/* Authentication type */

$cfg['Servers'][$i]['auth_type'] = 'cookie';

/* Server parameters */

$cfg['Servers'][$i]['host'] = 'localhost';

$cfg['Servers'][$i]['compress'] = false;

$cfg['Servers'][$i]['AllowNoPassword'] = false;

  • Save config.inc.php
  • Launch phpMyAdmin by accessing the phpMyAdmin hosted folder.
  • In my case https://localhost/phpMyAdmin5/ You should get the phpMyAdmin login screen. See image below.

All done! 🙂

Spell Check not working in LibreOffice on Ubuntu 18.04

This even though the hunspell dictionary seems to been installed in LibreOffice.

The solution is to open Terminal and

 sudo apt install hunspell-en-gb

Credits

Thanks to @timothy at AskUbuntu.com for the phpMyAdmin solution.

Thanks to TrisquelUser on https://ask.libreoffice.org/en/question/78558/spell-check-not-working/

for the LibreOffice Spell Checker fix.

Bonji and her Pups

Dogs, puppies, Belmonte, Luz de Tavira

We had Petit Gervais who was killed by poisoning in October. But there is a silver lining to this cloud. Bonji, my other bitch has had a litter of four pups. It was my fault I confess. I let her have a bit too much fun - with the boys. I had meant to sterilise her but the vet whom I use, - Sarah at NovaVet - in Tavira was off on maternity leave. She has had twins! Congratulations to you and the twins, Sarah :).

Bonji had the pups on the 5th of November so they are under a month old. Their fathers are various. I know not who. I only saw her couple with one – and he was a strange looking chap.

The pups have started a eating a bit of dog food but depend mainly on Bonji to keep them fed. Bonji finds this difficult. They are hungry little things. Their mother eats almost double her pre-pup diet but still finds it hard to feed them sometimes. And now they have some teeth so I imagine it must be even more uncomfortable.

Bonji was orphaned when she was a pup. She used to scream a lot and was a very angry pup. Her mother Roxy was also killed by poisoning along with a few other dogs of some of the neighbours . These puppies are very calm and happy and sleep a lot of the time. So we have peace and quiet. I dread when they will be able to clamber out of their makeshift enclosure of plastic pots. This occupies the living room floor. Bonji has the sofa.

She does a sterling job of keeping them clean. They are developing their own characters :). There is 1 girl and three chaps. I have named them Chubbs, Topman, BlackBoy and Conan. I hope to find good homes for them. I will keep one and am sending one to my niece.

Thanks for reading . This is it for now.