In the windows 20003 IIS6.0 support PHP configuration parties

 Many host systems in order to facilitate, on the basis of IIS on the same time resolved ASP, PHP and other scripting languages, so as to provide an all-around space. Write this article on how to configure PHP under IIS environment, the premise is win2003 server, IIS6.0.
    First of all, from the PHP official website: http://www.php.net/downloads.php download PHP archive, at the time of this writing, the latest version is PHP 5.3.0. Because it is win2003 environment, we download "PHP 5.2.10 zip package [10,242Kb] " under Windows Binaries can be. After the download, unzip to C: \ php directory (New php directory) (this address can be changed on the D drive you can also line).
    After the php.ini-dist file under: (/ PHP C) renamed to php.ini, PHP configuration file is it, several modifications following places, change is good: the second, open c \ php directory, PHP directory copy the php.ini file to the C: \ WINDOWS \ directory:
extension_dir = "C: \ php \ EXT", pointing php folder to place "php _ * dll." path of the file. PHP4 and PHP5 path here differ.
default_charset = "gb2312", to modify the default character set, where, if preceded by a semicolon ";", removing the semicolon;
register_globals is = Off to register_globals = On, so that the effective pass the global variables;
Extension = php_dba.dll if front semi-colon, semicolon canceled, following the same;
Extension = php_dbase.dll
extension = php_gd2.dll GD library do figure, generally used for CAPTCHA;
Extension = php_mysql.dll used to connect MYSQL database;
magic_quotes_gpc = the On If Off, must be open to On, this is an important step to prevent sql attacks ! On the 5.0 version has a default.
Third, copy php5ts.dll PHP files in the directory to the C: \ WINDOWS.
Fourth, the configuration IIS PHP extension, which is the focus.
1: Open IIS, right click and select "Properties" on the site needs to support PHP.
2: Find the "Home Directory" tab, click "application settings" on the bottom right corner in the "Configure" button.
3: In the "Application Extensions" window, click "Add", the executable file path c: /php/php5isapi.dll file, enter the extension .php, so automatically call php5isapi.dll explain PHP language in the resolution process . In addition also need to "Script engine" and "Check that file exists" is selected.
There are caveats, I felt no need for security must be extended all deleted, leaving only the extension necessary. If you are using a database that is mdb access, the need to resolve the suffix to mdb non asp.dll parsed script, such as: C: \ WINDOWS \ system32 \ inetsrv \ uihelper.dll,
4: Click Site Properties window "ISAPI Filter" tags, add filters, filter name: php, executable file: C: \ php \ php5isapi.dll, OK.
5: Click the Properties window of the "Documents", add index.php, default.php
6: Return IIS Manager, adding new services to expand in the "web service extension", the extensions: php, required file: C: \ php \ php5isapi.dll, " Set extension status to allow" pre-tick.
    Here, under IIS configuration is complete, you can restart IIS. Under the new website index.php, which is written on a <php echo phpinfo ();? ?> Can be. Open the website url, to see whether it is normal to display the information of php, if normal, indicating successful configuration.
    If the c: / php directory permissions settings are too strict, then, php extension under IIS is not loaded successfully, which requires us to c: / php directory plus read and run everyone, and List Folder Contents, read access permission to.

Published 13 original articles · won praise 4 · Views 2776

Guess you like

Origin blog.csdn.net/Angel_asp/article/details/6798025