Jump to content

Cannot get mysql extension to load - desperate


edfialk

Recommended Posts

Hi all, I'm desperately trying to get a simple mysql connection working in php 4.3.9 and I think I have a doozy for you guys.  First of all, I didn't set up ANY of this system, I'm just working with it.

 

So, on Redhat, we have two versions of PHP - Apache uses 4.3.9, there's also a 4.4.2 that is default from command-line.  4.3.9 was installed by RPM, 4.4.2 was built from source.

 

I can get mysql.so loaded and working fine in 4.4.2, but not in 4.3.9 (browser window).

 

The error on Apache startup:

PHP Warning:  Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

 

But I assure you the file and directory are there:

[root@niceguy httpd]# ll /var/www/html/extensions
total 1620
-rwxr-xr-x  1 root root  319888 Feb  2 10:06 gd.so
-rwxr-xr-x  1 root root   45632 Feb  2 10:06 ldap.so
-rwxr-xr-x  1 root root   41108 Feb  2 15:42 mysql.so
-rwxr-xr-x  1 root root 1214134 Jan 19 10:24 php_mapscript.so

 

See that php_mapscript.so.  That loads fiine, perfectly in fact.

 

Here's a little more info:

[root@niceguy httpd]# rpm -qa | grep "php"
php-ldap-4.3.9-3.22
php-mysql-4.3.9-3.22
php-gd-4.3.9-3.22
php-4.3.9-3.22
php-pear-4.3.9-3.22

 

So check this out:

[root@niceguy mapserver]# /usr/bin/php -v
PHP Warning:  Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: undefined symbol: php_sprintf in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: undefined symbol: php_sprintf in Unknown on line 0
PHP 4.3.9 (cgi) (built: Nov  2 2006 16:40:38)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[root@niceguy mapserver]# cp /usr/lib/php4/mysql.so /var/www/html/extensions
cp: overwrite `/var/www/html/extensions/mysql.so'? y
[root@niceguy mapserver]# /usr/bin/php -v
PHP Warning:  Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

 

See what I did? First I put the 4.4.2 built  from source mysql.so connector into extensions directory and tried to load it - undefined symbol is understandable, so then I moved the 4.3.9 (supposedly working) version to my extensions and POOF file's not there....  You can even see that I overwrote the file.  So apache was reading it before...but not now.

 

Again, desperate.  Anyone got any ideas?

Thanks!

-Ed

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.