Support » Installing WordPress » Installing: PHP Error: PHP installation appears to be missing MySQL

  • joeblough


    I am walking through the installation procedure.

    Win 2K
    IIS 5.0
    MySQL: 4.0.20a-debug
    PHP: 5.0.4 (just installed using windows installer, never used)

    Created database and user for wordpress.
    I’ve just created the wp-config.php file. The database and user are entered:
    define(‘DB_NAME’, ‘wordpress’);
    define(‘DB_USER’, ‘wp_user’);
    define(‘DB_PASSWORD’, ‘wp_pwd’);
    define(‘DB_HOST’, ‘localhost’);
    All else is default.

    I’ve started the MySQL process from the command line (it’s not installed as a service as such. I can connect to it just fine from PERL:DBI local programs).

    When I run install.php I get a message that says:
    Your PHP installation appears to be missing the MySQL which is required for WordPress.

    I’m completely baffled.

    I’m convinced from what I’ve read and seen that WordPress is the right technology for several projects I have coming up. But I can’t get a good install to do a proof of concept demonstration.

    Any clues? Tips? Hunches?
    Anybody ever see this before?

    Please help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • stchatterbox


    Joe, I met this situation once. And it’s the problem with this:

    define('DB_HOST', 'localhost');

    Try to check if your DB_HOST is localhost or something else. My current host is an IP like number..

    Good luck!



    I’m having the same problem. I’ve got PHP4 and PHP4-mysql installed. Do I need to “start” MySQL or something? I’ve never used it before. Do I need the MySQL client and server installed? (they’re both installed). I’m running linux (Kubuntu). Any suggestions are welcomed. I would really like to get this working. Thanks.



    Opps. Mine was due to an error in the config file. *hides*



    Well folks, progress has been made but I’m not out of the woods yet.

    Apparently the first error was due to my assumptions.

    The PHP5 distribution does not have php-mysql built in, nor does the automatic installer (which I used) include the file nor install it.

    So I’ve gone and gotten the manual distribution and edited the php.ini file to read:

    extension_dir = c:/php/ext/
    and extension statements for all the other extensions, what the heck.

    But now I am getting an error that says:

    [Error establishing a database connection]
    and then goes on to say
    [PHP Warning: PHP Startup: Unable to load dynamic library ‘c:/php/ext/php_iisfunc.dll’ – The specified module could not be found. in Unknown on line 0]
    followed by several other similar “Unable to load” messages.

    Once again, anybody gotta clue?

    I can connect to mysql from PERL::DBI scripts, why can’t PHP connect?




    This may not be what you’re looking for but an easy way to get WordPress running locally is by installing XAMMP . It installs PHP, MySQL and Apache (so no IIS). But it is dead easy to setup.

    PHPDev is another possibility.



    Thanks for the tip. I hesitate to go that route just yet, as I have most of the XAMMP components already installed, most particularly mysql, with a bunch of working databases in it.

    I have Apache2 and just tried running install.php again and got an even more bizarre response.

    The browser simply showed the content of the php page. Apparently it didnt execute. Does Apache have to be specially configured to execute PHP under Windows??????

    As I noted above I installed:
    PHP: 5.0.4

    But I thought that was only necessary for IIS. Did I break Apache by doing that??? Is that even possible???

    Curiouser and curiouser.

    Please advise.




    There seems to be an Apache2 configuration issue.

    Somehow it’s not processing php quite right. Ive added
    ScriptAlias /php/ “C:/php/”
    AddType application/x-httpd-php .php
    Action application/x-httpd-php “/php/php.exe”
    to httpd.conf

    The other errors have gone away but now I’m getting the dreaded
    [Premature end of script headers: php.exe]
    in the apache error.log



    XAMPP installs and configures itself to manage apache, php, and mysql without heaps of glitches. I’m not positive but it seems to me that installing XAMPP shouldn’t cause problems with your existing database – once XAMPP is installed and everything is running, you should be able to administer your existing databases through phpmyadmin.

    Needless to say, I could be entirely wrong. Someone will be sure to say so if that’s the case!

    Mark (podz)


    Support Maven

    click 1 – download
    click 2 – install
    click 3 – setup_xampp.bat

    That’s it.

    Found a fix.

    It turned out to be a PHP configuration problem.

    The answer is posted on another forum, phpbuilder,


    in case the anchor tag doesn’t render.

    Thanks for the tips and advice.

    Folks, this hasn’t seemed to have resolved the issue on my side. I even went to the trouble of creating this PHP script to make sure all was working properly in PHP…

    $dbh = mysql_connect($hostname, $username, $pass) or die (“message”);
    mysql_select_db(“wordpress”) or die(‘unable to select db’);
    $sth = mysql_query(“SELECT * FROM nowhere”) or die(‘failed in query – ‘ . mysql_error());

    The output from the above script is nothing. If I change the * in the select to an invalid field, I get an error. That tells me the port back to MySQL is working and it’s able to get data from the DB.

    FYI – I just upgraded to PHP 5.0.4 and this failed with both MySQL 4.1.11 and 4.1.13a. I’m running on WinXP. Any help is appreciated.

    s1kevin, the absolute easiest way to make sure your pieces-parts are all working right together is to download and install XAMPP from I’m not joking when I say this is about as painless as it gets….

    Here’s a great guide:

    I found the following to be useful when configuring WordPress to work with Windows XP, IIS 5.0 and PHP 5.1.6. I assume that IIS already serves up PHP pages and you’re getting the “Your PHP installation appears to be missing the MySQL which is required for WordPress” error.

    1. Go to and select “MySQL Connector/PHP”

    2. Download both the mysqli and mysql extensions.

    3. Move the files that begin with “php_” to your extensions directory (usually c:\php\ext). Overwrite the existing files since these are NEWER and the LATEST from MySQL.

    4. Move libmysql.dll to your PHP directory (C:\php). Overwrite the existing file (the one you’ve downloaded is NEWER). Both ZIP files will have the same libmysql.dll since after PHP 5.0.2 both the mysql and mysqli extensions use the same file.

    5. Edit your php.ini file (in C:\php). Ensure the following lines exist and are NOT commented out:


    6. Ensure your extensions directory is set as well in the php.ini file:

    extension_dir = “C:\php\ext”

    7. Configure Windows so it can find PHP, its DLLS, and the php.ini file (this was the CRITICAL step for me, especially the PHPRC variable I describe):

    Click Start -> Control Panel
    Double-click System
    Select the “Advanced” tab
    Click the “Environment Variables” button
    Under the “System variables” section, click the “Path” variable
    Click the “Edit” button
    Add “C:\php” to the path (no quotes). Note that each path is separated by a semicolon. Also, you should preferably add this EARLY in the path, since some of the MySQL DLLs may be included in other locations on your computer, and you’d like PHP to find the one installed in C:\php before it finds any other.
    Click “OK”
    Now, click the “New” button (again, in the “System variables” section)
    For variable name, supply “PHPRC”
    For variable value, supply “C:\php”
    Click “OK” repeatedly until you’ve got all the windows closed.

    8. Restart the computer so that these settings will be loaded and recognized by PHP. You can verify that your correct php.ini file is being loaded by testing a simple PHP page with the following:




    If your settings are correct, you should see that “Configuration File (php.ini) Path” is “C:\php\php.ini” on the resulting page.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Installing: PHP Error: PHP installation appears to be missing MySQL’ is closed to new replies.