Installation and configuration of iis+php 5.2 under Windows _php Tutorial

Source: Internet
Author: User
Tags pear
The installation of PHP under Windows is simple, but if you don't pay attention to the method, you still get a headache. In addition, the PHP 5.2 version is somewhat different from the previous 4.x version, so it is necessary to keep a record of it and avoid the next time you forget the installation configuration method.

Step one: Download the PHP 5.2 for Windows installation package and unzip to C:\php. Note that this decompression directory can be under any disk, however the directory name cannot contain spaces;

Here is the file directory for php5.2:
c:\php
|
+--dev
| |
| |-php5ts.lib
|
+--ext--Extension DLLs for PHP
| |
| |-php_bz2.dll
| |
| |-php_cpdf.dll
| |
| |-..
|
+--extras
| |
| +--mibs--Support files for SNMP
| |
| +--openssl--Support files for OpenSSL
| |
| +--pdf-related--Support files for PDF
| |
| |-mime.magic
|
+--pear--Initial copy of Pear
|
|
|-go-pear.bat--Pear setup Script
|
|-fdftk.dll
|
|-..
|
|-php-cgi.exe--CGI executable
|
|-php-win.exe--executes scripts without an opened command prompt
|
|-php.exe-CLI executable-only for command line scripting
|
|-..
|
|-php.ini-dist--Default php.ini settings
|
|-php.ini-recommended--Recommended php.ini settings
|
|-php5activescript.dll
|
|-php5apache.dll
|
|-php5apache2.dll
|
|-..
|
|-php5ts.dll--Core PHP DLL
|
|-...

Step two: The c:\php directory under the php.ini-recommended (or php.ini-dist file, the official recommendation for the former) copy to the current directory, and modify the file name is php.ini;

Step three: Edit PHP.ini. The following two lines of values are mainly modified:
Extension_dir = "C:\php\ext"
Doc_root = "C:\inetpub\wwwroot"
You need to delete these two lines at the beginning of the line; The value of Extension_dir is the ext directory under the PHP installation directory, and the value of Doc_root is the home directory set by IIS;

Step four: Set the environment variables. Add the following values after path:
;:\ Php
Then restart the computer.

Step Five: Open Internet Information Services, locate the "Default Web Site", and stop the site. Then open the Properties page. In the Properties page, locate the Home Directory tab, click the Configure button, and add the application mappings. The values are:
Executable file: C:\php\php5isapi.dll
Extension:. php
The rest without modification, OK, restart the default website;

Step Six: Create a new file hello.php under C:\inetpub\wwwroot. Input content:


World-liehuo.net






After saving, open the browser, enter the address: http://localhost/hello.php. If the page displays Hello World, the installation is correct. We can also view the source code of hello.php in the Web page, if there is no PHP code in the source code, it also indicates that the installation is correct.

Original source: Http://www.cnblogs.com/hsapphire/

http://www.bkjia.com/PHPjc/364511.html www.bkjia.com true http://www.bkjia.com/PHPjc/364511.html techarticle the installation of PHP under Windows is simple, but if you don't pay attention to the method, you still get a headache. In addition, the PHP 5.2 version and the previous 4.x version also have some differences, so it is necessary to record, avoid ...

  • 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.