MySQL Error Messages: MySQL server has gone away

Recently I have a huge problem. Some site stop working after a cpanel update ( we think ) .
Email client start to be slow, mysql give mysql server has gone away, some curl give us error.
After a few hour of research we find out that gethostbyaddr was the php function that kill the apps.
When we check our resolv.conf we see that one of the dns was working verry slow.
We exclude that, add google nameserver and everything was back to normal.
Also please check to not have your own server listed there.

Regards

FirePHP on Nginx zend_db_profiler_firebug Bad Gateway

Well because we have switch from apache to nginx we encountered a new problem .
When we have enable zend_db_profiler_firebug we got “bad gateway” error.

One simple fix for this is to append bellow line into your virtual.conf of ngix.
# set these two: zend_db_profiler_firebug
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;

It should look something like this.

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param APPLICATION_ENV production;
# set these two: zend_db_profiler_firebug
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;

}

problem with ffmpeg /usr/local/lib/libbz2.a: could not read symbols: Bad value

Again, try to reconfigure on another server ffmpeg, here I got another error.
/usr/local/lib/libbz2.a: could not read symbols: Bad value

/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text’ can not be used when making a shared object; recompile with -fPIC

After a little search I find out that on that server bzip was installed from sources not from package.
Only solution that work was to recompile bzip.
So i go into bzip directory, edit Makefile
and the line
CC=gcc
I modify it into
CC=gcc -fPIC
save the file
make clean
make
make install
And after that the ffmpeg was good to go.

install ffmpeg with librtmp problem

Well some day I have to install ffmpeg with librtmp. Well you have to download rtmpdump and configure and install it. However the problem that I want to talk here is about one error that he encountered.
Even I have installed rtmpdump, when I try to configure ffmpeg I got this error:
” cannot find librtmp ”
After a little search I find out that the problem was actuly that pkgconfig was missing. I have try yum install pkgconfig however didn’t find anything.
A sort fix was to locate librtmp.pc, find the path to it and after this to do this

export PKG_CONFIG_PATH=”${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig”

After that I have the ffmpeg with librtmp installed.

install fileinfo with pecl problem on centos

Today I was trying to install fileinfo on a server and get this error.

checking for magic files in default path… not found
configure: error: Please reinstall the libmagic distribution
ERROR: `/tmp/pear/download/Fileinfo-1.0.4/configure’ failed

After i try to install yum install libmagic , libmagic-dev , libmagic-devel and see don’t work the panic was here. After a long search I discover that the solution was to install
yum install file-devel

So if you are on same situation hope this will help you .

Regards