Installation and configuration of Windows iis+php 5.2 _win Server

Source: Internet
Author: User
Tags openssl pear
Step one: Download the PHP 5.2 for Windows installation package and extract it to C:\php. Note that this decompression directory can be under any disk, but the directory name cannot contain spaces;
The following is the php5.2 file directory:
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: Copy the php.ini-recommended (or php.ini-dist file, officially recommended) under the C:\php directory to the current directory and modify the file name to PHP.ini;
Step three: Edit PHP.ini. Mainly modify the values of the following two lines:
Extension_dir = "C:\php\ext"
Doc_root = "C:\inetpub\wwwroot"
You need to delete these two lines at the beginning of a change; The Extension_dir value is the ext directory in the PHP installation directory, and the Doc_root value is the home directory of the IIS settings;
Step four: Set the environment variable. After path, add the following values:
;:\ 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, and click the Configure button to add the application mappings. The values are:
Executable file: C:\php\php5isapi.dll
Name extension:. php
The rest does not need to be modified, after confirmation, restart the default Web site;
Step Six: Create a new file hello.php under C:\inetpub\wwwroot. Input content:
<title>World</title>

<body>
<?php echo "Hello World"?>
</body>
After saving, open the browser, enter the address: http://localhost/hello.php. If the page says Hello World, the installation is correct. We can also view the source code of the hello.php in the Web page, if the source code does not have PHP code, also shows that the installation is correct.

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.