IIS6.0 Support for PHP configuration under Windows 20003

Source: Internet
Author: User
Tags .net asp click configuration configure default directory download

At present, many host systems for convenience, on the basis of IIS at the same time parsing the ASP, PHP and other scripting languages, so as to provide users with an all-round space. This article writes about how to configure the PHP environment under IIS, provided that the Win2003 server, IIS6.0.
    First, from PHP official website: http://www.php.net/downloads.php Download PHP compression package, in writing this article, the latest version is PHP 5.3.0. Because it is the win2003 environment, we download the "PHP 5.2.10 zip package [10,242kb]" under Windows binaries. After downloading, unzip to the c:php directory (new PHP directory) (this address can be changed you can put in D disk also line).
    Second, open the c:php directory, the PHP directory (c:/php) under the Php.ini-dist file renamed to php.ini,php configuration file is it, modify the following several places, modify the php.ini File copied to the C:windows directory:
extension_dir= "C:phpext", pointing to the path to place the "Php_*.dll" file under the PHP folder. The paths of PHP4 and PHP5 are different here.
default_charset= "gb2312", modify the default character set, where, if preceded by a semicolon ";", remove this semicolon;
Register_globals=off to Register_globals=on, Make the pass global variable valid;
Extension=php_dba.dll if preceded by a semicolon, cancel the semicolon to the same;
Extension=php_dbase.dll
extension=php_gd2.dll    GD library to do drawings, generally used for graphics verification code;
Extension=php_mysql.dll is used to connect to the MySQL database;
MAGIC_QUOTES_GPC = on if off, be sure to open on. This is an important step in preventing SQL attacks! Version 5.0 is already on by default.
Third, copy the Php5ts.dll file under the PHP directory to c:windows.
Four, configure IIS under the PHP extension, which is the focus.
1: Open IIS in a website that needs to support PHPRight-click to select Properties.
2: Locate the Home Directory tab and click the "Configure" button in the lower-right corner of the application settings.
3: In the Application Extensions window, click Add, Executable path c:/php/php5isapi.dll file, extension input. php, which will automatically invoke Php5isapi.dll to interpret the PHP language during parsing. You also need to select the script engine and check for file presence.
There is a need to be aware of this, that you must delete all unnecessary extensions for security, leaving only the necessary extensions. If you use an MDB database, access, you need to parse the MDB suffix onto a asp.dll-resolved script, such as: C:windowssystem32inetsrvuihelper.dll,
4: Click ISAPI Filter in the Site Properties window tags, adding filters, filter names: PHP, executables: C:phpphp5isapi.dll, OK.
5: Click "Documents" in the Properties window, add index.php,default.php
6: Return to IIS Manager, add a new service extension in the Web service extension, PHP, file name: C:phpphp5isapi.dll, "Set extension status to allow" before hooking.
    Here, the configuration is complete under IIS, and IIS can be restarted. Under the website new index.php, inside write a sentence <?php echo phpinfo ();? >. Open the Web site URL to see if the normal display of PHP information, if normal, description of successful configuration.
    If the directory permissions set for c:/php are too restrictive, the PHP extensions under IIS cannot be loaded successfully, which requires us to add everyone's read and run to the c:/php directory, listing the folder directories, and reading permissions.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.