LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   PHP not loading mysql.so (http://www.linuxquestions.org/questions/slackware-14/php-not-loading-mysql-so-689029/)

Onthax 12-07-2008 11:13 PM

PHP not loading mysql.so
 
i have just installed slackware 12.1, installed httpd (apache) and php, i am going to be using this as a webserver and have it connect to a 2nd box to do the mysql, however when apache starts, i am getting bunch of errors in the logs, and the following error in phpmyadmin

"Cannot load mysql extension. Please check your PHP configuration"

i have checked my php.ini and have run a test.php script with phpinfo()
and get

Code:

extension_dir        /usr/lib/php/extensions/
been trying to work out what is going on for the last couple of days, it's finally getting to me, have googled and forumed searched, havent found anything that helps, i have tried checking the extension dir variable, that works fine, i have also changed the permissions on the .so files to 777, still no luck, any help would be fantastic

extract from error_log in /var/log/httpd
Code:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/curl.so' - libidn.so.11: 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/extensions/gd.so' - libt1.so.5: 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/extensions/mhash.so' - libmhash.so.2: canno
t 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/extensions/mysql.so' - libmysqlclient.so.15
: 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/extensions/mysqli.so' - libmysqlclient.so.1
5: 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/extensions/pdo_mysql.so' - libmysqlclient.s
o.15: 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/extensions/pspell.so' - libaspell.so.15: ca
nnot 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/extensions/snmp.so' - libnetsnmp.so.15: can
not 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/extensions/xsl.so' - libexslt.so.0: cannot
open shared object file: No such file or directory in Unknown on line 0

extract from ls -l in php extensions folder in /usr/lib/php/extensions


Code:

-rwxr-xr-x 1 root root  29768 2007-11-11 06:17 bcmath.so
-rwxr-xr-x 1 root root  19268 2007-11-11 06:17 bz2.so
-rwxr-xr-x 1 root root  24804 2007-11-11 06:17 calendar.so
-rwxr-xr-x 1 root root  10780 2007-11-11 06:17 ctype.so
-rwxr-xr-x 1 root root  57176 2007-11-11 06:17 curl.so
-rwxr-xr-x 1 root root  49532 2007-11-11 06:17 dba.so
-rwxr-xr-x 1 root root  27844 2007-11-11 06:17 dbase.so
-rwxr-xr-x 1 root root  47312 2007-11-11 06:17 exif.so
-rwxr-xr-x 1 root root  43248 2007-11-11 06:17 ftp.so
-rwxr-xr-x 1 root root  363040 2007-11-11 06:17 gd.so
-rwxr-xr-x 1 root root  11412 2007-11-11 06:17 gettext.so
-rwxr-xr-x 1 root root  39676 2007-11-11 06:17 gmp.so
-rwxr-xr-x 1 root root  32140 2007-11-11 06:17 iconv.so
-rwxr-xr-x 1 root root  40028 2007-11-11 06:17 ldap.so
-rwxr-xr-x 1 root root 1849976 2007-11-11 06:17 mbstring.so
-rwxr-xr-x 1 root root    7012 2007-11-11 06:17 mhash.so
-rwxr-xr-x 1 root root  45332 2007-11-11 06:17 mysql.so
-rwxr-xr-x 1 root root  98192 2007-11-11 06:17 mysqli.so
-rwxr-xr-x 1 root root  78948 2007-11-11 06:17 openssl.so
-rwxr-xr-x 1 root root  86164 2007-11-11 06:17 pdo.so
-rwxr-xr-x 1 root root  23920 2007-11-11 06:17 pdo_mysql.so
-rwxr-xr-x 1 root root  392960 2007-11-11 06:17 pdo_sqlite.so
-rwxr-xr-x 1 root root  19580 2007-11-11 06:17 pspell.so
-rwxr-xr-x 1 root root    7460 2007-11-11 06:17 shmop.so
-rwxr-xr-x 1 root root  22980 2007-11-11 06:17 snmp.so
-rwxr-xr-x 1 root root  305480 2007-11-11 06:17 soap.so
-rwxr-xr-x 1 root root  332252 2007-11-11 06:17 sqlite.so
-rwxr-xr-x 1 root root  14104 2007-11-11 06:17 tokenizer.so
-rwxr-xr-x 1 root root  29636 2007-11-11 06:17 wddx.so
-rwxr-xr-x 1 root root  23400 2007-11-11 06:17 xsl.so
-rwxr-xr-x 1 root root  61664 2007-11-11 06:17 zip.so
-rwxr-xr-x 1 root root  27476 2007-11-11 06:17 zlib.so


mRgOBLIN 12-08-2008 12:54 AM

You need to install mysql as the libraries are in that package.

if you want to use gd you'll need to install
t1lib
libX11
libXpm
libxcb
libXau
libXdmcp

The other errors can be fixed by commenting the modules in the php.ini or meeting the dependencies

E.g
aspell mhash snmp libxslt libidn

ninja master 12-08-2008 08:33 AM

search for my name, to install mysql quickly and easily.

Onthax 12-08-2008 08:30 PM

Quote:

Originally Posted by mRgOBLIN (Post 3367759)
You need to install mysql as the libraries are in that package.

if you want to use gd you'll need to install
t1lib
libX11
libXpm
libxcb
libXau
libXdmcp

The other errors can be fixed by commenting the modules in the php.ini or meeting the dependencies

E.g
aspell mhash snmp libxslt libidn

Cheers, that all works fine now, anyway to not have mysql installed on the web server, as i am using a 2nd box for mysql

mRgOBLIN 12-08-2008 10:20 PM

if you really wanted to you could strip the libraries out of the package but unless space is tight I wouldn't advise it. It would make upgrades etc. pretty messy.

Just don't start the mysql server and it won't be any problem.

You can build mysql and pass --without-server , docs, etc. to configure but I don't see there being much to gain by customising the package.

pizzipie 05-28-2009 04:56 PM

Hi,

I am using Ubuntu 8.10 with LAMP PROGRAMS.
Apache2 works. PHP works. MySQL works.

I am trying to get phpmyadmin to work but keep getting the "Mysql entension not loaded error.

The php.ini has "extension=mysql.so" and extension_dir=/usr/lib/php5/20060613+lfs/

The phpinfo file reports under "PHP core" that the extension dir is as above. I can't figure out what to do next.

Please help.

R

Nille_kungen 05-28-2009 08:01 PM

pizzipie do an 'ls -l /usr/lib/php5/20060613+lfs/' on that dir and check permissions and if the mysql.so is there.
But i think that the question would be better answered in the ubuntu section of linuxquestions.org since slackware users apt magic isn't that great.
http://www.linuxquestions.org/questions/ubuntu-63/

pizzipie 06-05-2009 02:58 PM

All fixed - A Big Thanks!!!!!!!!!!!!!!
 
Quote:

Originally Posted by Nille_kungen (Post 3555987)
pizzipie do an 'ls -l /usr/lib/php5/20060613+lfs/' on that dir and check permissions and if the mysql.so is there.
But i think that the question would be better answered in the ubuntu section of linuxquestions.org since slackware users apt magic isn't that great.
http://www.linuxquestions.org/questions/ubuntu-63/

Permissions (chmod +x *) fixed it. I keep forgetting to check when something goes wrong.

Again Thanks!

R


All times are GMT -5. The time now is 06:33 AM.