Sometimes, while trying to run a query that contains large data size in MySQL, you will receive the following error: “Got packet bigger than ‘max_allowed_packet’ bytes”. This error is very common when dumping, restoring or inserting content that contains blob or large strings of data.

In order to resolve this error, all you need to do is to locate the used my.cnf and increase the max_allowed_packet variable. It is generally recommended to set it to 32M.

On Debian distributions, the cnf file is generally located at /etc/mysql/my.cnf.

If you have received this error while you were restarting the Apache2 server on Debian Squeeze:

/etc/init.d/apache2 start
Starting web server: apache2apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName

To fix this problem  you need to edit the /etc/apache2/apache2.conf.

1. Open the /etc/apache2/apache2.conf file with your favorite editor.

vim /etc/apache2/apache2.conf

2. Now add the following line:

ServerName localhost

3. Restart apache2 server:

 /etc/init.d/apache2 restart
Restarting web server: apache2 … waiting ..

Now your problem is gone. Enjoy.

NEW: Forum is online

Valic —  February 13, 2012 — Leave a comment

Announcing the new Debian-Tutorials.com forum!

The new Debian-tutorials.com forum is up and running! Before we send you there, we’d like to tell you a few things about the new forum.

The new forum is running on IP.Board platform. Please register to the new forum.

Go to the new forum now!

 

 

If you have tons of entries like this in apache2 log and you want to get rig of them:

127.0.0.1 – – [07/Feb/2012:02:56:15 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:16 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:17 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:07 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:20 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:21 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:22 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”
127.0.0.1 – – [07/Feb/2012:02:56:23 +0200] “OPTIONS * HTTP/1.0” 200 152 “-” “Apache/2.2.16 (Debian) (internal dummy connection)”

Here is how to remove them.:

Step1. Edit /etc/apache2/apache2.conf:

vim /etc/apache2/apache2.conf

Here we will create a filter called local or any other name you want:

Continue Reading…

Here is how to change from apache2-mpm-prefork to apache2-mpm-worker, , when having used mpm-prefork before, and php5, on Debian Squeeze.

Step1. Stop Apache2:

# /etc/init.d/apache2 stop

Step2. Install apache2-mpm-worker:
That will remove some packages, like apache2-mpm-prefork and libapache-mod-php5, and install apache2-mpm-worker, and php5-cgi instead.

# apt-get install apache2-mpm-worker

Step3. Set Apache2 to use php5-cgi:

Continue Reading…