LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-07-2008, 11:13 PM   #1
Onthax
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Rep: Reputation: 0
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
 
Old 12-08-2008, 12:54 AM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
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

Last edited by mRgOBLIN; 12-08-2008 at 12:57 AM.
 
Old 12-08-2008, 08:33 AM   #3
ninja master
Member
 
Registered: May 2008
Distribution: gentoo amd64 xwrt
Posts: 407

Rep: Reputation: 30
search for my name, to install mysql quickly and easily.
 
Old 12-08-2008, 08:30 PM   #4
Onthax
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mRgOBLIN View Post
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
 
Old 12-08-2008, 10:20 PM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
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.
 
Old 05-28-2009, 04:56 PM   #6
pizzipie
Member
 
Registered: Jun 2005
Location: Sagle, ID
Distribution: Ubuntu 13.04
Posts: 83

Rep: Reputation: 0
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
 
Old 05-28-2009, 08:01 PM   #7
Nille_kungen
Member
 
Registered: Jul 2005
Posts: 211

Rep: Reputation: 43
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/
 
Old 06-05-2009, 02:58 PM   #8
pizzipie
Member
 
Registered: Jun 2005
Location: Sagle, ID
Distribution: Ubuntu 13.04
Posts: 83

Rep: Reputation: 0
All fixed - A Big Thanks!!!!!!!!!!!!!!

Quote:
Originally Posted by Nille_kungen View Post
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
 
  


Reply

Tags
apache, httpd, mysql, php, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php/shell script to install mysql,apache and php automatically stranger_6_7 Linux - General 2 08-11-2009 02:07 AM
mysql works from command line, but mysql.sock (13) error from php.. leif_84 Linux - Server 0 07-23-2007 12:59 PM
Problem getting PHP to recognize MySQL, Using PHP 4.0 and MySQL 4.0.20 d2army Programming 4 06-27-2004 08:54 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM


All times are GMT -5. The time now is 06:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration