This error appears when you are running a database import.
To fix this:
A:
1) If you can; open as administrator the my.cnf file under the mysqld or etc folder.
2) Locate the entry max_allowed_packet and set this to a bigger number as you wish. It should be around 1M by default.
B:
You can also, use mysql console to update the values as
set global net_buffer_length=[SOME_BIG_NUMBER];
set global max_allowed_packet=[SOME_BIG_NUMBER];
C:
You could also get away with only the following command. however in my case it seemed to work well with a combination of step A.
mysql --max_allowed_packet=[SOME_NUMBER]M -uroot -p [dbname] < dump.sql
Open your netbeans and go to your project. Then do the following

Here is how a command you can use to run a php script from a cron job. This has been done in CPanel
php /home/your_username/[public_html/www]/somefolder/somefile.php
Here is how to use lynx (browser) to run/access a URL from a cron task
lynx -source http://domain.com/myfile.php
Here is a snippet command for changing file/folder permissions via command line
find . -type d -exec chmod 755 {} \;
NOTE: Please also the permissions numbers as you prefer
If you are getting this error while trying to run a command on the terminal window, especially an apt-get install command, chances are you are running the synaptic manager at the same time.
You must close the synaptic package manager and run the command again. All should be good now!
This solution uses the MPACK package (included in Debian)
1) install the package if you havent yet:
sudo apt-get install mpack
2) On your command terminal, navigate to the folder that contains your Plesk backup file. Run the following commands:
sudo zcat DUMP_FILE.gz > DUMP_FILE
sudo cat DUMP_FILE | munpack
3) In result you get the set of tar and sql files that contain domains’ directories and databases. Untar the needed directory. For example if you need to restore the httpdocs folder for the DOMAIN.TLD domain:
sudo tar xvf DOMAIN.TLD.htdocs
NOTE: According to Parallels (the makers of plesk) ‘munpack’ utility may not work with files greater then 2Gb and during dump extracting you may receive the error like
sudo cat DUMP_FILE | munpack
DOMAIN.TLD.httpdocs (application/octet-stream)
File size limit exceeded
For more information or tips on this refer to http://kb.parallels.com/en/1757