Configure curlftpfs on Ubuntu to mount a ftp share

To mount a ftp share on Ubuntu use curlftpfs utility. To install it apply the famous command:

sudo apt-get install curlftpfs

Now create an empty folder where you want to mount the ftp share to.

mkdir /home/ftpshare             (change permission to 777 so everyone can access it)

To enable everyone the mount the ftp share use:

sudo chgrp fuse /home/ftpshare


sudo chmod 777 /etc/fuse.conf

To mount the ftp share in the above directory apply this command:

curlftpfs user:password@ftp /home/ftpshare

Cheers 🙂



How to check if a field from MySql is null, and insert null field in MySql??

In PHP to check if a field from MySQL is null use the keyword is_null like: is_null($row[‘fld’])

In PHP to insert a Null value into MySQL field use the trick:
$date = is_null($row[‘date’]) ? “null”: “‘” . $row[‘date’] “‘”;

The following will not work:
$date = is_null($row[‘date’]) ? NULL: “‘” . $row[‘date’] “‘”;
This is because PHP null is different than MySQL null and in the above statement the PHP NULL will assign a blank to the var $date and inside MySQL query this blank appears as blank BUT MySQL requires null instead of blank.