Jump to content

PHP - MySQL - IIS XPP issue


Recommended Posts

I'm trying to run MediaWiki on an XPP SP2 box.  So far have done everything I can find anywhere, but no luck.  When I browse to [mywikipath]index.php to do the config, I get the following error:

    * PHP 5.1.6 installed
      Could not find a suitable database driver!
          o For MySQL, compile PHP using --with-mysql, or install the mysql.so module
          o For PostgreSQL, compile PHP using --with-pgsql, or install the pgsql.so module


PHP.  Installed PHP5 from php-5.1.6-Win32.zip into standard C:\PHP directory.  Can browse to and execute simple scripts OK.  Added C:\PHP and C:\PHP\ext to my PATH.

MySQL.  Installed from mysql-essential-5.0.24a-win32.msi.  Running it as a service and can do things like mysqlshow OK.  Also downloaded and installed php_5.1.6_mysqli_5.0.26-win32.zip, putting php_mysqli.dll into C:\PHP\ext.

PHP.INI  Copied php.ini-recommended to php.ini.
Unremmed extension=php_mysqli.dll.  Set extension_dir = "C:\PHP\ext". Set sql.safe_mode = Off. Set doc_root = c:\inetpub\wwwroot.

Have read lots of posts, but no luck.  Any help MOST appreciated.
Link to comment
Share on other sites

Your script requires the standard MySQL Library (php_mysql.dll) not the MySQL Improved Library (php_mysql[b]i[/b].dll (note the i after' mysql' and before '.dll').

So enable extension=php_mysql.dll from within the php.ini. Restart your server.

The MySQL Improved Library has a completely different function library. Also You don't need to enable the MySQL Improved Library if you have MySQL5 installed.
Link to comment
Share on other sites

Thanks, but I've tried both mysql and mysqli. Both give the same error.  Today, however, I get another error first (but only once per reboot).  It says
"PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll' - The specificed module could not be found." Then another ditto about mysqli (both of which are currently unremmed in php.ini).
Then I get the same error as at first.
The path is currect and both dlls are there.

I would change to Apache, but can't in my environment.

Arghh!
Link to comment
Share on other sites

Where is the location of the following file:
libmysql.dll

The above file should be located in the WINDOWS  (or WINNT) folder if you have not added your PHP folder to the Windows PATH variable. PHP needs to find this file in order to load up the mysql(i) extension

Also make sure there is no older version of libmysql.dll that PHP might be finding too.
Link to comment
Share on other sites

Thanks.  It's in C:\PHP, which is in my PATH.  I tried putting it into Windows, but that didn't help either.  Did a search, and there's only one on my machine. I'm currently using the libmysql.dll and php_mysql.dll from php_5.1.6_mysql_5.0.26-win32.zip, but I previously tried the one that came with PHP and the ones that came from mysqlI~.zip.

Guess I'll find a simple script to run something in MySQL to see whether that's working WITHOUT Mediawiki.
Link to comment
Share on other sites

Just create a file called mysql-test.php and do something like this:
[code=php:0]<?php

echo "Connecting to MySQL Server...."

$conn = mysql_connect("localhost", "username", "password");

echo "<br />Connection established!<br /><br />Selecting Database....";

mysql_select_db("mysql");

echo "Database selected!!<br /><br />";

?>[/code]

If you get the following output:
[quote]Connecting to MySQL Server....
Connection established!

Selecting Database....
Database selected!![/quote]
Then the mysql extension is loaded.
Link to comment
Share on other sites

Thanks. That gave an error, but in searching, I found another "ext" directory UNDER the first one, with another copy of php_mysql.dll in it.  Moved that up a level, and voila! No idea where it came from, unfortunately.

Thank you all!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.