IIS configuration for "PHP" under Windows2003 php5.4

Source: Internet
Author: User
Tags vc9 microsoft website
This article and "PHP" under the Windows2003 configuration Apache2.4 and php5.4 (click to open the link) for the sister article, just PHP used by the server is a little different, here is a Apache2.4, a Windows2003 comes with the IIS server.

First, install IIS in Windows2003

1, first open the Windows2003 Control Panel, to see if there is "management tools", no matter, click "Add or Remove Programs". If so, you can go directly to the second step of IIS configuration.

2, in the pop-up window, select Add/Remove Windows components, select the "Network Services" component and "Application Server" components hook, in general, simply hook these two components, but also open the "Application Server" component details, the inside can hook the hook, If there is only a gray tick on the hook, then the "details" of the item should be opened, and all the components inside are checked. To ensure that our ASP site does not run because one component is missing.


3, all components after the check, click OK, the installation process, will be asked to find Windows2003 installation image Windows Server 2003 Enterprise Edition Sp2.iso, no words on the internet a lot of search.


4, the installation process, you may be asked to set the IP address, click on the Microsoft network client Select "Properties", arbitrarily specify an IP to Windows2003 can, this is not the end of the IP we give the user, it is not related.


5. Wait for the installation to complete, and IIS is ready to install. After that, you can open the IE6 browser, enter http://localhost/iisstart.htm directly, and see a "building" page right, indicating that IIS has run successfully.


Second, configure the necessary plug-ins for IIS under WINDOWS2003

First, Windows2003 to install VC9 's runtime and fcgi to run php5.4 under IIS as expected.

VC9 's runtime library can be downloaded from the Microsoft Official website.

Website: http://www.microsoft.com/zh-cn/download/details.aspx?id=29


If you have any trouble, you can copy the following address directly to download tool: http://download.microsoft.com/download/7/5/0/ 7502f4e9-1f90-4895-9259-1bde67b8b9a1/vcredist_x86.exe

After the download is a vcredist_x86.exe, the next step to install directly, the installation path is not your choice. Install temporary files will be generated in the same directory, please delete them after installation.

FCGI can also be downloaded from Microsoft website at: http://www.microsoft.com/en-us/download/details.aspx?id=11881

Or simply throw the following URL into the download tool download: http://222.200.129.44/download.microsoft.com/download/E/0/C/ E0c0709a-66e5-4113-9a6c-a5f65bf6717d/fcgisetup_1.5_x86_rtw.msi

The same is the next installation, the installation path is not your choice. After the installation is complete, open C:\WINDOWS\system32\inetsrv\fcgietx.ini with Notepad

Add the following text at the end:

[Types]php=php[php]exepath=php Compressed Directory \php-cgi.exe

, where PHP's compression directory is C:\php-5.4.43-nts-Win32-VC9-x86, save exit.



Third, the configuration of PHP

After the above two components, the official can download php5.4, because php5.5 later version does not support WinXP kernel system, so can only use php5.4, and Apache is different, open the official website of PHP: http://cn2.php.net/ After downloads.php, this time to download a non-thread-safe php5.4 such as:


After downloading the extract to get a C:\php-5.4.43-nts-Win32-VC9-x86, the same as, the php.ini-production renamed to PHP.ini, directly open with Notepad.


Make the following modifications to the php.ini:

(1) Using Notepad's ctrl+f, locate the keyword "Extension_dir", specifying the PHP compression directory is the running directory. Take note of the preceding remark;


(2) Positioning date in the Date.timezone designated time zone for our country's time zone, or write "Asia/shanghai" is also possible, the same attention to the previous expression of comments;


(3) Finally locate the extension=, open the PHP service component, put the red line is commented before the component, remove, for opening characters, PHP Mail Service, and Php_mysql service support. Save PHP.ini exit.

Then in the directly create a new PHP directory folder, here is C:\phpSite, or inside a new 1.php, write a fairly classic code:

 
  


Iv. Mounting PHP to IIS

1. Control Panel--Manage Tools->internet Information Services (IIS) Manager opens IIS, right-click New Web site


2, the website description any, here take phpsite as an example, set the IP and port of the publishing site, here can directly use 80 port, because the WINDOWS2003 80 port itself is occupied by IIS. The following is an example of IP 192.168.80.128 this intranet address.


3, the site folder is set to just established C:\phpSite, permissions can default to "read", if you want to upload a file to "write" tick, of course, you can set later, then click Next, complete the creation of the site

4, after the site more than just established phpsite, on its right-click, properties, for further settings.


5. Turn to "home directory" select "Configuration", "Add", "Browse", select C:\WINDOWS\system32\inetsrv\fcgiext.dll, the extension is filled with. php. In the Action column, for security can be limited to: Get,head,post,debug. Such as:


6, after all the way to determine, complete the configuration, directly open the browser input: 192.168.80.128/1.php See the following website, prove the configuration is complete!


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

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