Page 1 of 1
MySQL troubles after upgrading to PHP 5.0.4
Posted: Wed Jul 05, 2006 10:27 am
by jason|xoxide
After upgrading to PHP 5.0.4 I'm now unable to load the MySQL modules. If I check /var/log/httpd/error_log then I see:
Code: Select all
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - libmysqlclient.so.14: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - libmysqlclient.so.14: cannot open shared object file: No such file or directory in Unknown on line 0
Running "ls -al /usr/lib/php/modules" gives me:
Code: Select all
drwxr-xr-x 2 root root 4096 Jul 5 10:23 .
drwxr-xr-x 4 root root 4096 Jan 29 21:29 ..
-rwxr-xr-x 1 root root 682402 Jan 29 21:29 gd.so
-rwxr-xr-x 1 root root 951440 Jan 29 21:29 imap.so
-rwxr-xr-x 1 root root 75813 Jan 29 21:29 ldap.so
-rwxr-xr-x 1 root root 2332455 Jan 29 21:29 mbstring.so
-rwxr-xr-x 1 root root 278495 Jan 29 21:29 mysqli.so
-rwxr-xr-x 1 root root 97990 Jan 29 21:29 mysql.so
-rwxr-xr-x 1 root root 158549 Jan 29 21:29 pgsql.so
So the permissions look ok. I'm not sure why it would be coming up as "No such file or directory."
Posted: Wed Jul 05, 2006 10:37 am
by jason|xoxide
More info:
Code: Select all
[root@xoxide1 root]# yum list installed | grep mysql
mysql i386 4.1.20-1.art.rhel3.art db
mysql-bench i386 4.1.20-1.art.rhel3.art db
mysql-compat i386 4.1.20-1.art.rhel3.art db
mysql-devel i386 4.1.20-1.art.rhel3.art db
mysql-server i386 4.1.20-1.art.rhel3.art db
php-mysql i386 5.0.4-13.rhel3.art db
Code: Select all
[root@xoxide1 root]# yum list installed | grep php
php i386 5.0.4-13.rhel3.art db
php-devel i386 5.0.4-13.rhel3.art db
php-gd i386 5.0.4-13.rhel3.art db
php-imap i386 5.0.4-13.rhel3.art db
php-ldap i386 5.0.4-13.rhel3.art db
php-mbstring i386 5.0.4-13.rhel3.art db
php-mysql i386 5.0.4-13.rhel3.art db
php-pear i386 5.0.4-13.rhel3.art db
php-pgsql i386 5.0.4-13.rhel3.art db
phpAds noarch 2.0.5-7506 db
phpBB noarch 2.0.17-7518 db
phpBook noarch 1.50-7507 db
phpBugTracker noarch 1.19-7506 db
phpDig noarch 1.85-7505 db
phpMoney noarch 1.3-7510 db
phpMyFamily noarch 1.4.1-7508 db
phpWiki noarch 1.3.11-7508 db
phpsurveyor noarch 0.98-7510 db
Code: Select all
[root@xoxide1 root]# locate libmysqlclient.so
/usr/lib/mysql/libmysqlclient.so.14.0.0
/usr/lib/mysql/libmysqlclient.so.14
/usr/lib/mysql/libmysqlclient.so
/usr/lib/libmysqlclient.so.10
/usr/lib/libmysqlclient.so.10.0.0
Posted: Wed Jul 05, 2006 11:06 am
by jason|xoxide
It's that last one that seems to be it. After making symlinks from /usr/lib/libmysqlclient.so.14 to /usr/lib/mysql/libmysqlclient.so.14 and from /usr/lib/libmysqlclient_r.so.14 to /usr/lib/mysql/libmysqlclient_r.so.14, everything started working. Does anyone know why they might have been installed in the wrong place?
Posted: Wed Jul 05, 2006 12:57 pm
by scott
Can you give me the output of rpm -qf [full path to each lib]? I'll bet this is a rhel3-ism, where Ive got to change the mysql rpms to force the paths on that distro.
Posted: Wed Jul 05, 2006 1:52 pm
by jason|xoxide
Let me know if you need anything else
Code: Select all
[root@xoxide1 root]# rpm -qf /usr/lib/mysql/libmysqlclient.so.14
mysql-4.1.20-1.art.rhel3.art
[root@xoxide1 root]# rpm -qf /usr/lib/mysql/libmysqlclient_r.so.14
mysql-4.1.20-1.art.rhel3.art
[root@xoxide1 root]# rpm -qf /usr/lib/libmysqlclient.so.10
mysql-compat-4.1.20-1.art.rhel3.art
[root@xoxide1 root]# rpm -qf /usr/lib/libmysqlclient_r.so.10
mysql-compat-4.1.20-1.art.rhel3.art
It's worth mentioning that my boxes still running 4.4.2 do not have the .so.14 files in the /usr/lib directory either, yet they work without the symlinks pointing to the /usr/lib/mysql folder. The MySQL version is the same.
Posted: Wed Jul 05, 2006 3:41 pm
by scott
I think on the centos3/rhel3 boxes I had to build without the -compat lib installed for some reason. I think it was because the build the utils on 3 are so far out of date that it cant resolve the paths correctly. I'll be so glad when rhel3 is dead and buried, its like FC1's (more) evil twin.
Posted: Wed Jul 05, 2006 4:04 pm
by jason|xoxide
Yeah, well, unfortunately, I've got a few servers at The Planet all using RHEL3. I really can't afford the downtime of having them reloaded with RHEL4 and then having to restore everything. To my knowledge, there is no way to upgrade from 3 to 4 without being able to boot from the install media so I guess I'm stuck until I need new hardware and have to move boxes anyway.
If someone knows of a reliable remote upgrade method, please let me know.
Posted: Wed Jul 05, 2006 4:19 pm
by scott
Posted: Wed Jul 05, 2006 5:09 pm
by jason|xoxide
Does that wipe out everything on the server? If it loads a minimal CentOS 4.3 image, do I need to reinstall packages that I've added or that were preinstalled on my server (like Plesk)?
Posted: Thu Jul 06, 2006 7:22 am
by scott
Yeah thats a minimal install (at this time) of CentOS 4.3. The kickstart.cfg file can be modified to change the packages you want on the system.
Posted: Tue Jul 11, 2006 9:27 am
by pedrodj
jason|xoxide wrote:It's that last one that seems to be it. After making symlinks from /usr/lib/libmysqlclient.so.14 to /usr/lib/mysql/libmysqlclient.so.14 and from /usr/lib/libmysqlclient_r.so.14 to /usr/lib/mysql/libmysqlclient_r.so.14, everything started working. Does anyone know why they might have been installed in the wrong place?
how i made a symlink ?
