947740 Posted May 29, 2008 Share Posted May 29, 2008 I posted this in MySQL help, but I think that is the wrong place... I have installed MySQL on IIS 6 with PHP, but PHP cannot use the mysql functions. I have the libmysql.dll file in 3 places-C:\Windows,C:\Windows\system32, and C:\Windows\system. The PHP version is 5.2.6 and MySQL is version 5. Any Ideas. My php.ini file is attached. Help would be MUCH appreciated! And yes, I have looked at the tutorial linked from the PHP Help forum. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 29, 2008 Share Posted May 29, 2008 Have you enabled the extension=php_mysql.dll line in the php.ini too? Umm, I must update my FAQ for this problem as I now discourage moving files outsite of the PHP folder and recommend adding PHP to the PATH instead. Quote Link to comment Share on other sites More sharing options...
947740 Posted May 29, 2008 Author Share Posted May 29, 2008 Yes. Quote Link to comment Share on other sites More sharing options...
947740 Posted May 29, 2008 Author Share Posted May 29, 2008 PHP is added to the PATH variable. And yes, it is before the MySQL part in that variable. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 29, 2008 Share Posted May 29, 2008 OK first of remove any files which you have moved outside of the php directory. Download the php zipped binaries distrubuton from php.net rather than the installer. Extract the contents of the zip to where you install PHP to (I presume C:\php) making sure you overwrite existing files/folders. Now restart IIS. Make a new file call this file phpinfo.php add the following code <?php phpinfo(); ?> Now run this file from your website. Look for the line that begins with Loaded Configuration File The file path stated to the right of that line should be the correct path to the php.ini your are editing. If its set to (none) then PHP is not reading your php.ini and thus the mysql extension is not loading. Make sure your php.ini is in your PHP folder. If PHP is added to the PATH correctly it should load the php.ini from your PHP Installation folder. Restart ISS and re-run the phpinfo.php script and PHP should now be reading your php.ini If its now reading the php.ini it should now be able to load the mysql extension(s) too. Check by scrolling down the pageooking for the MySQL and MySQL Improved sub headings/sections. Quote Link to comment Share on other sites More sharing options...
947740 Posted May 29, 2008 Author Share Posted May 29, 2008 Okay, thanks. I will do that right now. As far as PATH goes, it should just be C:\PHP, right? (Assuming PHP is installed in C:\PHP) Quote Link to comment Share on other sites More sharing options...
947740 Posted May 29, 2008 Author Share Posted May 29, 2008 Actually, I just looked at the phpinfo file I have right now, and there is not a php.ini file loaded. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 29, 2008 Share Posted May 29, 2008 Where is your php.ini file currently? Make sure it is in your PHP installation folder. Once you have the moved the php.ini IIS will need to be restarted. Quote Link to comment Share on other sites More sharing options...
947740 Posted May 29, 2008 Author Share Posted May 29, 2008 It is in the PHP folder. Quote Link to comment 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.