You are here: cannot load mysql extension - desperate « PHP Programming Language « IT news, forums, messages
cannot load mysql extension - desperate

Posted by edfialk on 02/06/07 18:34

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация