Configuring mysql 5 with php5


Results 1 to 8 of 8

Thread: Configuring mysql 5 with php5

  1. #1
    Join Date
    Dec 2008
    Location
    Johannesburg
    Posts
    18

    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?

  2. #2
    Join Date
    Sep 1999
    Posts
    3,202
    Did you restart your apache service?

  3. #3
    Join Date
    Dec 2008
    Location
    Johannesburg
    Posts
    18
    Quote Originally Posted by ph34r View Post
    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

  4. #4
    Join Date
    Aug 2001
    Location
    Somewhere, Texas
    Posts
    9,627
    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.

  5. #5
    Join Date
    Dec 2008
    Location
    Johannesburg
    Posts
    18
    Quote Originally Posted by Icarus View Post
    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.

  6. #6
    Join Date
    Sep 2002
    Location
    Harlow, UK
    Posts
    1,788
    Last edited by deathadder; 01-15-2009 at 05:05 AM.
    If you have to ask why you want to install Linux, then perhaps you shouldn't.
    -- Michael D. Watts (Gone but never forgotten)

    Linux is not Windows | Posting Guidelines

    Code Monkey (YouTube)

  7. #7
    Join Date
    Sep 1999
    Posts
    3,202
    Also, try creating a .php file with
    Code:
    <?php
    phpinfo();
    ?>
    in it, and then view it. See if mysql is listed in the output.

  8. #8
    Join Date
    Dec 2008
    Location
    Johannesburg
    Posts
    18
    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&#37;.

    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
  •