-
Configuring mysql 5 with php5
I seem to have some trouble with the php 5 configuration
working on debian etch
apache installed through aptitude
php 5 installed through aptitude
then mysql installed via apt-get
php5 mysql module installed by running
apt-get install php5-mysql
but when I open phpmyadmin i get the error
"Cannot load mysql extension. Please check your PHP configuration. - Documentation"
can anyone help me out?
-
Did you restart your apache service?
-
Originally Posted by ph34r
Did you restart your apache service?
yes, everytime i made a change or so on i used
/etc/init.d/apache2 restart
or /etc/init.d/apache2 reload
I know that mysql is running because I created a user through the comman line and authenticated that user in a php script, so there must be something more that phpmyadmin needs
-
Is mysql running? (I've made this mistake a couple times)
double check it just in case
also make sure the mysql modules are uncommented in the (http.conf or php.ini?) config
extension=mysql.so
extension=gd.so
Was php5-mysql the same version as the php5 install?
I'm done at reaching for answers for the moment
Check the apache error logs also.
-
Originally Posted by Icarus
Is mysql running? (I've made this mistake a couple times)
double check it just in case
also make sure the mysql modules are uncommented in the (http.conf or php.ini?) config
extension=mysql.so
extension=gd.so
Was php5-mysql the same version as the php5 install?
I'm done at reaching for answers for the moment
Check the apache error logs also.
Yes mysql most definitely running, checked by using the command line.
I uncommented the mysql.so line in php.ini then restarted apache but that had no effect, should gd.so also be uncommented ?
not sure if it was the same version, installed php5 through aptitude and php5-mysql through apt-get, also ran an updated after the install, got no errors throughout the process so think it is the same version
not too sure if the apache error logs will show anything, but will check tonight when I get home for sure.
-
Last edited by deathadder; 01-15-2009 at 05:05 AM.
-
Also, try creating a .php file with
Code:
<?php
phpinfo();
?>
in it, and then view it. See if mysql is listed in the output.
-
ph34r - I created a php file as you suggested and saw that the mysql module was not loaded, thanks for the advice.
I found the answer at help.ubunt.com thanks to deathadder.
I needed to add an ext directory, configure the extension_dir directive in the php.ini file and copy the mysql extension into the new dir
restart apache and all was working 100%.
thanks to all who helped out
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|