MySQL troubles after upgrading to PHP 5.0.4

Support/Development for PHP
jason|xoxide
Forum User
Forum User
Posts: 21
Joined: Wed Jul 05, 2006 9:17 am

MySQL troubles after upgrading to PHP 5.0.4

Unread post 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."
jason|xoxide
Forum User
Forum User
Posts: 21
Joined: Wed Jul 05, 2006 9:17 am

Unread post 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
jason|xoxide
Forum User
Forum User
Posts: 21
Joined: Wed Jul 05, 2006 9:17 am

Unread post 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?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
jason|xoxide
Forum User
Forum User
Posts: 21
Joined: Wed Jul 05, 2006 9:17 am

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
jason|xoxide
Forum User
Forum User
Posts: 21
Joined: Wed Jul 05, 2006 9:17 am

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

jason|xoxide
Forum User
Forum User
Posts: 21
Joined: Wed Jul 05, 2006 9:17 am

Unread post 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)?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
pedrodj
Forum User
Forum User
Posts: 28
Joined: Tue Jul 04, 2006 7:14 am

Unread post 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 ? ;)
Post Reply