Lectrician Posted November 20, 2007 Share Posted November 20, 2007 I have only just started playing with PHP, and have installed it onto my Microsoft 2000 Server. It works fine, and I have played with some code. I decided to install MySQL, I am sure the MySQL installed successfully - I can create a database etc at the MySQL command prompt. However, PHP scripts that need to use MySQL do not run. I have looked over a couple links, and put a couple test scripts on my server. One script tells me to include the full path to the Mysql.dll file, so I tried this with no success (extension=c:\php\ext\php_mysql.dll) The other script tells me the location of the php.ini file is in the c:\WINNT directory, which it isn't. It also says the php.ini is not loaded. I copied the php.ini to the c:\WINNT folder as a test, and then non of my PHP scripts will run, not even the two test ones I had running. Removing this file allows the PHP scripts to run again. So, I am assuming some settings are incorrect in the php.ini file, and possibly somewhere else, as I thought the php.ini file is meant to go in the c:\php dir. Any clues as to where to start looking!?! I am using PHP V5.2.5 and MySql V5.0.45 Community Edition. Thanks all! Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 20, 2007 Share Posted November 20, 2007 Do you have Apache installed ? Read this link (i think same issue) http://www.phpfreaks.com/forums/index.php/topic,153649.0.html Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 Thanks for that - No I do not have apache running. I have read that thread, and there is no conclusion to it yet unfortunatly. Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 20, 2007 Share Posted November 20, 2007 if you already have mssql function working properly then its just a problem with your configration with the mysql dll files. Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 Yes, but this is where I am having trouble ??? I have put php.ini in the windows directory, and now the php test script shows that php.ini file as being loaded. However, none of my previously working php scripts now execute. I assume previously I had the php scripts executing but no php.ini loaded. So the problem must lie in the php.ini file? I will get looking...... Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 20, 2007 Share Posted November 20, 2007 you will have to put the libmysql.dll file in the system32 folder, also try and run php.exe and see if it gives you any error messages Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 Thanks. Is there no way to tell PHP to find these files in the php directory? Seems sensible to leave them where they can easily be changed/upgraded? Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 Is there a default php.ini file that is already configured for use on a windows server? I am having trouble getting any PHP script to run when I put the php.ini file into the windows dir? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 20, 2007 Share Posted November 20, 2007 well you can keep all the files in your respective directories you just have to add them to the path. Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 The system environment path? I thought I had done that....I will look. Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use extension=c:/full/path/to/php_mysql.dll in your php.ini in D:\www\martandkate\test.php on line 2 Fatal error: Call to undefined function mysql_get_client_info() in D:\www\martandkate\test.php on line 3 This is the error I get when trying to open a database using php. Quote Link to comment Share on other sites More sharing options...
Lectrician Posted November 20, 2007 Author Share Posted November 20, 2007 GRANT ALL ON *.* to php@'localhost' IDENTIFIED BY 's3cret'; Found this while googling the error message, used this command at the MySQL prompt, and bingo - all working. Seems I need to teach my self a little more about MySQL! Thanks for the input. 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.