Windows2003 Server iis6+php5.4.3 Configuration Installation Tutorial

Source: Internet
Author: User
Tags iis php script register php tmp folder vc9 win32 zip

Preparation of related components

1. Install fastcgi for IIS6

Please refer to the Windows Server 2003 installation fastcgi:http://www.111cn.net/sys/windows/49843.htm

2, VC2008 Library


Software downloads


Microsoft Visual C + + 2008 SP1

32-bit system applicable: Vcredist_x86.exe

64-bit system applicable: Vcredist_x64.exe

Note: The PHP script environment for VC9 x86 cannot be installed without the VC2008 library installed.


3, PHP script environment

PHP 5.4.3 Thread Safe:php-5.4.3-win32-vc9-x86.zip

For No thread safe and thread safe version selection, please refer to: Leave address


Other PHP Versions: http://windows.php.net/download/

Second, start installing PHP


Here we take the example of installing PHP 5.4.3 Thread safe.

1, decompression PHP 5.4.3 Thread safe Compression Package

Second, start installing PHP

Here we take the example of installing PHP 5.4.3 Thread safe.

1, decompression PHP 5.4.3 Thread safe Compression Package

Under C disk, create a new directory named "PHP5", and extract the files inside the php-5.4.3-win32-vc9-x86.zip into "c:php5".

2, give the PHP5 folder "users" permission

3, to the PHP temporary folder to give writable permission

Create a new ' TMP ' folder in ' C:php5 ' and give ' user ' writable permission. (The TMP folder can be customized to a different path)

Ii. copying and setting up related documents

1, copy the extension file php

Copy all the. dll files under "C:PHP5" to "c:windowssystem32" and recommend overwriting if you are prompted to overwrite the file.

If you are afraid to find trouble, you can execute the following code under the cmd command line:

Copy C:php5*.dll C:windowssystem32

Path Please note that you modify it yourself.

2, to fastcgi register PHP

Modify the C:windowssystem32inetsrvfcgiext.ini file to the bottom of the file and fill in the following information:

The code is as follows Copy Code

[Types]
php=php
[PHP]
Exepath=c:php5php-cgi.exe

See figure:

3. Modify PHP.ini

Back to "C:PHP5", by default, php.ini This file is not found, please rename "php.ini-development" to "php.ini" and double-click it to open the file.

Then press the shortcut key CTRL+F5 to find and modify the related characters.

1) Modify PHP directory

Find

Extension_dir = "./"

and amended to

Extension_dir = "C:/php5/ext"

2) Modify the temporary folder path

Find

; Upload_tmp_dir =

Remove ";" and fix it instead

Upload_tmp_dir = "C:/php5/tmp"

Of course, this directory can be set in other places, but must have readable, writable, modifiable permissions.

3) Continue to change

Find

Fastcgi.impersonate = 1, remove the front ";"

Find

Short_open_tag = off, remove front ";" and change off to On

4) Find Windows Extensions

The code is as follows Copy Code

; Extension=php_curl.dll
; Extension=php_gd2.dll
; Extension=php_gettext.dll
; Extension=php_ldap.dll
; Extension=php_mbstring.dll
; Extension=php_exif.dll
; Extension=php_mysql.dll
; Extension=php_mysqli.dll
; Extension=php_sockets.dll
; Extension=php_xmlrpc.dll

The above commonly used components in front of the ";" Remove.

5) Modify Time zone

Find, Date.timezone =, remove front ";" and change to Date.timezone = "Asia/shanghai"

If you do not modify the time zone, there will be 500 errors on some server systems.

4, copy the file

The php.ini file will just be copied to the "C:windows" directory, and the PHP program directory php.ini modified to "#php. ini" or delete, to prevent PHP at the time of the call conflict.

Third, configure IIS

1, open Internet Information Services Manager, in the "website" point right → properties → main directory → configuration, into the "application Configuration"

2, click the Add button, in the executable file, fill in:

C:windowssystem32inetsrvfcgiext.dll

3. Fill in the extension name:

. php

4, limit the action, fill in:

Get,head,post

Then click OK to exit all settings.

Four, test PHP

Run C:php5php-cgi.exe directly, if the above configuration error-free, the following figure will appear:

If an error occurs, check to see if the VC2008 library or other configuration is correct.

Restart IIS to take effect on the configuration that was just configured

Ctrl+r The Run command, enter "CMD", and perform IISRESETto restart IIS.

Finally, to the IIS Web site directory to create a new PHP file, and put the following code, if the normal display of the success of the PHP installation.

<?php
  phpinfo ();
? >

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.