Here the mysql version is selected as the mysql-5.1.41-win32.msi, installed in the C: \ mysql directory.
The following is the configuration of mysqll:
Open the c: \ windows \ PHP. ini file;
Search; Extension = php_mysql.dll, remove ';
Search; Extension = php_gd2.dll, remove ';'
Search; Extension = php_mbstring.dll, remove ';'
Search; Extension = php_dba.dll, remove ';'
Search; Extension = php_dbase.dll, remove ';'
Search; Extension = php_imap.dll.dll, remove ';'
Query; Session. save_path = "/Temp", remove ";", change "/Temp" to "C: \ WINDOWS \ Temp", and change libmysql in the bin directory under the MySQL installation directory. DLL copied to the "C: \ WINDOWS \ System32" Directory
Create a new testdb. php file under c: \ apache2.2 \ htdocs
<?
$ Link = mysql_connect ("localhost", "root", "123456"); // change 123 to your MySQL password.
If (! $ Link)
Echo "fail to connect to MySQL! ";
Else echo "Success connect to MySQL! ";
Mysql_close ();
?>
Restart Apache server and enter http: // 127.0.0.1/testdb. php In the browser. If "Success connect to MySQL!" appears !", It proves that MySQL is successfully installed.
Other configurations:
Under data handling, locate post_max_size = 8 m. This is the maximum size of post data that PHP will accept and can be changed to 20 m.
Under paths and directories, find extension_dir = where the PHP search extension library is located, set its path to the location of the extensions folder, that is, change it to: extension_dir = "C: \ PHP \ Ext"
Under file uploads, find upload_max_filesize = 2 m. The maximum file size that can be uploaded can be changed to 20 m.
Dynamic extensions is part of PHP extension settings. All extensions supported by PHP are listed. A semicolon comment is added before, indicating that the current PHP configuration does not support extension, we can remove the semicolon to allow PHP to support this extension.
Enter test. php In the c: \ apache2.2 \ htdocs directory <? PHP phpinfo ();?> Restart Apache. Enter http: // 127.0.0.1/test. php In the browser and view the PHP version information, which proves that the PHP configuration is complete.