Jump to content

Archived

This topic is now archived and is closed to further replies.

Ting

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.

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites
You can just delete that extra php_mysql.dll file. it most probably a older version

Share this post


Link to post
Share on other sites

×

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.