GeekPatrolMille

Well-Known Member
Mar 12, 2004
84
0
156
McKinney, Texas, USA
I have had a new error pop up overnight and could use some insight from those who would be more knowledgeable than myself...

Whenever a site with PHP is accessed I get the following error message:

root@svr001 [/usr/lib]# tail /usr/local/apache/logs/error_log -f
/usr/bin/php: error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such file or directory
[Thu Jul 26 10:13:23 2007] [error] [client x.x.x.x] Premature end of script headers: /home/geekpat/public_html/index.php
[Thu Jul 26 10:13:23 2007] [error] [client x.x.x.x] File does not exist: /home/geekpat/public_html/500.shtml


I did a locate on the missing file to find:

root@svr001 [~]# locate -v libmysqlclient.so
/usr/local/cpanel/lib/libmysqlclient.so.14


I have rebuilt apache a few times with different settings to try to get things back on track but no good...

Thank you in advance...
-greg
 

mtindor

Well-Known Member
Sep 14, 2004
1,508
136
343
inside a catfish
cPanel Access Level
Root Administrator
I have had a new error pop up overnight and could use some insight from those who would be more knowledgeable than myself...

Whenever a site with PHP is accessed I get the following error message:

root@svr001 [/usr/lib]# tail /usr/local/apache/logs/error_log -f
/usr/bin/php: error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such file or directory
[Thu Jul 26 10:13:23 2007] [error] [client x.x.x.x] Premature end of script headers: /home/geekpat/public_html/index.php
[Thu Jul 26 10:13:23 2007] [error] [client x.x.x.x] File does not exist: /home/geekpat/public_html/500.shtml


I did a locate on the missing file to find:

root@svr001 [~]# locate -v libmysqlclient.so
/usr/local/cpanel/lib/libmysqlclient.so.14


I have rebuilt apache a few times with different settings to try to get things back on track but no good...

Thank you in advance...
-greg

Looks like something (probably your apache/php) is depending upon (i.e. compiled against) an older version of MySQL but you have a more recent vintage MySQL installed now.

Mike
 

sparek-3

Well-Known Member
Aug 10, 2002
2,172
279
388
cPanel Access Level
Root Administrator
Have you tried recompiling PHP?

You can do this through easyapache. That should solve any dependency issues that have come about due to a MySQL upgrade or MySQL library upgrade.
 

GeekPatrolMille

Well-Known Member
Mar 12, 2004
84
0
156
McKinney, Texas, USA
One additional bit of info... At a shell prompt I get the following error:

root@svr001 [/etc]# php
php: error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such file or directory


Is there a way to rebuild PHP so the correct modules are included?

Thanks again,
-greg
 

GeekPatrolMille

Well-Known Member
Mar 12, 2004
84
0
156
McKinney, Texas, USA
I have changed versions of PHP in easyapache and rebuilt several times. I am not getting the following messages:


===============SNIP===============
./configure [@php-4.4.7]...(--with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --enable-ftp --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-zlib).... . . . . . . . . . . . Done
configure: error: Cannot find MySQL header files under /usr

make [@php-4.4.7]...(-j 1 clean).... Done

make [@php-4.4.7]...(-j 1)...Done

make [@php-4.4.7]...(install)...Done
/etc/rc.d/init.d/httpd start: httpd started

./configure [@php-4.4.7]...(--prefix=/usr --with-xml --enable-bcmath --enable-calendar --enable-ftp --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-zlib).... . . . . . . . . . Done
configure: error: Cannot find MySQL header files under /usr
make [@php-4.4.7]...(-j 1 clean)...Done

make [@php-4.4.7]...(-j 1)...Done

make [@php-4.4.7]...(install)...Done
initfpsuexec: using apache 1.x support
PHP version file has been updated to

===============SNIP===============
 

GeekPatrolMille

Well-Known Member
Mar 12, 2004
84
0
156
McKinney, Texas, USA
OK, it is solved...

I updated mySQL to v4.1
I ran /scripts/mysqlup --force
I then rebuilt apache again... This time it actually ran through the PHP build

Everything came up fine.

Thank you to everyone who had suggestions... Collectively they led me to the answer I needed. :D

-greg