Ting Posted October 29, 2006 Share Posted October 29, 2006 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 modulePHP. 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. Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/ Share on other sites More sharing options...
wildteen88 Posted October 29, 2006 Share Posted October 29, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-116235 Share on other sites More sharing options...
Ting Posted October 29, 2006 Author Share Posted October 29, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-116398 Share on other sites More sharing options...
wildteen88 Posted October 30, 2006 Share Posted October 30, 2006 Where is the location of the following file:libmysql.dllThe 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) extensionAlso make sure there is no older version of libmysql.dll that PHP might be finding too. Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-116902 Share on other sites More sharing options...
Ting Posted October 31, 2006 Author Share Posted October 31, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-117090 Share on other sites More sharing options...
wildteen88 Posted October 31, 2006 Share Posted October 31, 2006 Just create a file called mysql-test.php and do something like this:[code=php:0]<?phpecho "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. Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-117432 Share on other sites More sharing options...
Ting Posted November 3, 2006 Author Share Posted November 3, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-118856 Share on other sites More sharing options...
wildteen88 Posted November 3, 2006 Share Posted November 3, 2006 You can just delete that extra php_mysql.dll file. it most probably a older version Quote Link to comment https://forums.phpfreaks.com/topic/25444-php-mysql-iis-xpp-issue/#findComment-119190 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.