Support » Installing WordPress » missing the MySQL extension

  • Resolved macedonmike


    I am getting this message when running install.php

    Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

    I believe I have the php-mysql extensions installed, I am running Ubuntu Hardy Heron. Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • I checked and I have php5-mysql installed, do I need something else?

    To simply install an extension is not enough; PHP has to be configured to use it.

    Run phpinfo(); it will output information about all extensions currenly enabled.

    Okay I ran phpinfo() from the command line and that is obviously not the way to do that. I’m going to go through the php docs and some tutorials and see if I can figure it out. If there are any good intros I’d appreciate a point in the right direction




    Okay I ran phpinfo() from the command line and that is obviously not the way to do that.

    you can run phpinfo from the command line.

    php phpinfo

    its wiser and easier though to create a file named phpinfo.php, and put this in it:


    put it in a web accessible area, and just open that file in your browser


    you can run phpinfo from the command line.

    php phpinfo

    Generally, that would be a bad idea, as the command-line PHP interpreter may not be using the same php.ini the Apache module (or CGI/FastCGI executable) is using. Not so mention the fact that running php phpinfo will probably result in an error; you need to run either php -i or php -r 'phpinfo();'

    You other recommendation, however, is right on the money. :)




    oh gee, i left off the -i switch.

    pardon me. I spose thats no more ambiguous than this though.

    Run phpinfo();

    Just sayin’.

    Here is how to configure PHP in Apache:

    13. Setup your php.ini

    cp php.ini-dist /usr/local/lib/php.ini

    You may edit your .ini file to set PHP options. If you prefer having
    php.ini in another location, use –with-config-file-path=/some/path in
    step 10.

    If you instead choose php.ini-recommended, be certain to read the list
    of changes within, as they affect how PHP behaves.

    14. Edit your httpd.conf to load the PHP module. The path on the right hand
    side of the LoadModule statement must point to the path of the PHP
    module on your system. The make install from above may have already
    added this for you, but be sure to check.

    For PHP 4:

    LoadModule php4_module modules/

    For PHP 5:

    LoadModule php5_module modules/

    15. Tell Apache to parse certain extensions as PHP. For example, let’s have
    Apache parse .php files as PHP. Instead of only using the Apache AddType
    directive, we want to avoid potentially dangerous uploads and created
    files such as exploit.php.jpg from being executed as PHP. Using this
    example, you could have any extension(s) parse as PHP by simply adding
    them. We’ll add .phtml to demonstrate.

    <FilesMatch \.php$>
    SetHandler application/x-httpd-php

    Or, if we wanted to allow .php, .php2, .php3, .php4, .php5, .php6, and
    .phtml files to be executed as PHP, but nothing else, we’d use this:

    <FilesMatch “\.ph(p[2-6]?|tml)$”>
    SetHandler application/x-httpd-php

    And to allow .phps files to be executed as PHP source files, add this:

    <FilesMatch “\.phps$”>
    SetHandler application/x-httpd-php-source

    16. Use your normal procedure for starting the Apache server, e.g.:

    /usr/local/apache2/bin/apachectl start

    – OR –

    service httpd restart

    The full documentation is available at:

    Thankyou for the help everyone

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘missing the MySQL extension’ is closed to new replies.