Php debugging environment is applicable to: Microsoft Windows XP SP2 (IIS 5.1)
Abstract: This tutorial explains how to install the latest version of PHP and MYSQL in XP SP2 (IIS5.1.
Before installing the software in a windows environment, make sure that the latest service patch of the operating system has been installed on the machine. then, download all the latest PHP and MYSQL installation files to a temporary directory with sufficient space. finally, make sure that IIS 5.1 is installed on the machine.
Download: PHP 5.1.4 zip package
Download: mysql-5.0.22-win32.zip
Download: php_5.1.4_mysql_5.0.22-win32.zip
1. install PHP
1. create a new PHP folder under C: \ and decompress all the downloaded PHP 5.1.4 zip packages to this folder;
2. under any folder, decompress php_5.1.4_mysql_5.0.22-win32.zip to obtain the php_mysql.dll and libmysql. dll files;
3. move php_mysql.dll to the C: \ PHP \ ext \ folder;
4. move libmysql. dll to the C: \ PHP \ folder;
5. find the PHP. ini-dist file in the C: \ php \ folder, rename it php. ini, and open the file;
6. in php. in the INI file, find extension_dir = ". /"(note: this row specifies the PHP extension search location). Edit this row as follows: extension_dir =" C: \ PHP \ ext \ "(note: do not ignore the last slash );
7. find the following line in the php. ini file:; extension = php_mysql.dll (note: the semicolon starting from this line instructs PHP to ignore this line), and delete the semicolon starting from this line to enable extended extension = php_mysql.dll;
8. save and close the php. ini file;
9. copy the modified php. ini file to the C: \ Windows \ folder;
10. in the C: \ PHP \ folder, find libmysql. dll file and copy it to the C: \ windows \ System32 folder (note: This file is required for IIS to process PHP 5 and MYSQL ).
So far, PHP installation is complete.
II. test PHP installation
1. create a new PHP folder under the C: \ Inetpub \ wwwroot \ folder;
2. open the Internet Information Service (IIS) manager in administrative tools, or enter "inetmgr" (excluding quotation marks) in the running dialog box to confirm.
3. find PHP under the default website, right-click the PHP folder, select "properties", and click "create" → "configuration" on the "directory" tab ", open the application configuration dialog box.
4. click "add" on the "ing" tab to open the "add/edit application extension ing" dialog box, click "browse" after "executable file", and navigate to C: \ PHP \ php5isapi. dll, enter "in the text box after" extension ". php "(note: pay attention to the period before the extension), click OK.
5. click "OK" to exit the "application configuration" dialog box, and click "OK" to exit the PHP properties dialog box.
So far, IIS configuration is complete.
III. test PHP installation
1. under C: \ Inetpbu \ wwwroot \ php \, create a new notepad file and open it. enter the following code:
Phpinfo ();
?>
Save the code in this section as version. php (the suffix name must be php ).
2. open your browser and enter localhost/php/version. php in the address bar. if it is displayed as normal, PHP is successfully installed.