Beginners first Use Appserv or XAMPP integrated installation package, so that you do not have to install the apahce/mysql/php alone and worry about.
I've been setting up my own environment lately, and I'm always having a MySQL extension that doesn't fit. The extension of Extension=php_mysql.dll has been opened in php.ini. Later discovered that the core point is under the Windows system, the required PHP directory: Libmysql.dll and Php5ts.dll Copy to: Under the Windows directory under the system32!
Fatal error:call to undefined function mysql_connect ()
Did not open MySQL extension.
PHP.ini inside; extension=php_mysql.dll Remove the preceding semicolon.
------------------------------------------------------------------------------------------------------------
This error was encountered today when debugging a database connection:
Fatal error:call to undefined function mysql_connect () in ...
Refer to the comments on the Internet, but not very detailed, many are not easy to understand, so slowly debugging, after finally OK!
1. Copy the Libmysql.dll and Php5ts.dll to System32 under the Windows directory!
2. Modify the php.ini in the Windows installation directory to remove; Extension=php_mysql.dll front semicolon;
There are always the following issues
Fatal error:call to undefined function mysql_connect () inch D:\masterphp\test-mysql.php on line 2
And also
Fatal error:call to undefined function imagecreatefrompng () inch D:\masterphp\make_button.php on line 11
I've used almost all the methods on the Internet, such as:
Copy the external library libmysql.dll to the System32 directory, and then remove the semicolon from the Extension=php_mysql.dll, I actually copied all the. dll to the System32 directory, and removed all the extension =* the former;
But it's still not working.
Configured as follows
Apahce 2.0.59, PHP 5.1.6 MYSQL 5.0
Finally add
Phpinidir "D:\PHP5"