HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   phpmyadmin "Cannot load mysql extension. Please check your PHP configuration" (http://www.howtoforge.com/forums/showthread.php?t=16298)

rjamesd 18th October 2007 12:52

phpmyadmin "Cannot load mysql extension. Please check your PHP configuration"
 
When I attempt to visit the phpmyadmin index page i.e.

http://localhost/phpmyadmin/index.php

I get: Cannot load mysql extension. Please check your PHP configuration.
error message

Now, I assume that 'mysql extension' and PHP MySQL package are actually the same thing, but different names.

Using synaptic debian package manager I can see that I have php5-mysql installed so I should not be getting the above error message.

I suspect that phpmyadmin has made an assumption about the path location of the PHP MySQL package so all I need to do is find how/where phpmyadmin looks for the PHP MySQL package.

Can you advise me where the phpmyadmin settings are stored?

falko 19th October 2007 12:39

You can add the line
Code:

extension=mysql.so
to your php.ini (should be /etc/php5/apache2/php.ini or something like that) and restart Apache.

rjamesd 23rd October 2007 15:59

Thanks BUT It doesn't work. Still get same error.
 
Quote:

Originally Posted by falko
You can add the line
Code:

extension=mysql.so
to your php.ini (should be /etc/php5/apache2/php.ini or something like that) and restart Apache.

Thanks BUT It doesn't work. Still get same error.

mysql.so is a file and your solution doesn't precede the mysql.so with a path for the file so it assumes that PHP will know where to look for this file, apart from the current working directory that the php.ini is in.

On my set up, doing a find from the root / directory, find . -name mysql.so
Gives:
./usr/lib/php5/20060613+lfs/mysql.so
./usr/lib/perl5/auto/DBD/mysql/mysql.so

Neither of these seem to apply to my setup because info.php tells me I'm running PHP Version 4.4.4-8+etch4 (i.e. not PHP5)
and the php.ini file is: /etc/php4/apache2/php.ini

As I have done in other posts - when or if I find a solution to my own problem I will post it here.

rjamesd 23rd October 2007 16:04

Thanks BUT It doesn't work. Still get same error.
 
Quote:

Originally Posted by falko
You can add the line
Code:

extension=mysql.so
to your php.ini (should be /etc/php5/apache2/php.ini or something like that) and restart Apache.

Thanks BUT It doesn't work. Still get same error.

mysql.so is a file and your solution doesn't precede the mysql.so with a path for the file so it assumes that PHP will know where to look for this file, apart from the current working directory that the php.ini is in.

On my set up, doing a find from the root / directory, find . -name mysql.so
Gives:
./usr/lib/php5/20060613+lfs/mysql.so
./usr/lib/perl5/auto/DBD/mysql/mysql.so

Neither of these seem to apply to my setup because info.php tells me I'm running PHP Version 4.4.4-8+etch4 (i.e. not PHP5)
and the php.ini file is: /etc/php4/apache2/php.ini

As I have done in other posts - when or if I find a solution to my own problem I will post it here.

rjamesd 23rd October 2007 16:27

Solution
 
The problem was that I did not have php4-mysql package installed.

I know this because I used synaptic package manager (type synaptic at the command line) which showed that php4-mysql was not installed.

I installed this and phpmyadmin works

I did not follow your advice falco - I did not need to edit the php.ini file.

But thanks anyway.


All times are GMT +2. The time now is 16:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.