Jump to content

[SOLVED] MySQL and PHP Config Problems


Lectrician

Recommended Posts

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!

 

Link to comment
https://forums.phpfreaks.com/topic/78051-solved-mysql-and-php-config-problems/
Share on other sites

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......

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.

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.

Archived

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

×
×
  • Create New...

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.