Jump to content


Photo

PHP - MySQL - IIS XPP issue


  • Please log in to reply
7 replies to this topic

#1 Ting

Ting
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 29 October 2006 - 12:28 AM

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.

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 October 2006 - 12:53 PM

Your script requires the standard MySQL Library (php_mysql.dll) not the MySQL Improved Library (php_mysqli.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.

#3 Ting

Ting
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 29 October 2006 - 07:07 PM

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!


#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 October 2006 - 07:32 PM

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.

#5 Ting

Ting
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 31 October 2006 - 01:47 AM

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.

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 31 October 2006 - 06:30 PM

Just create a file called mysql-test.php and do something like this:
<?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 />";

?>

If you get the following output:

Connecting to MySQL Server....
Connection established!

Selecting Database....
Database selected!!

Then the mysql extension is loaded.

#7 Ting

Ting
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 03 November 2006 - 01:17 AM

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!

#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 03 November 2006 - 05:44 PM

You can just delete that extra php_mysql.dll file. it most probably a older version




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users