How to configure the PHP runtime environment in Windows 8 IIS

Source: Internet
Author: User
Tags configuration php

Build the PHP Runtime environment in IIS (8.0) in Windows 8:

One: Install the IIS server

1. Go to Control Panel >> programs and features >> turn Windows features on or off, find Internet Information Services, and remember to select the CGI

2. After the installation is complete, open localhost in the browser to see if you can display the IIS Welcome page:

II: Download and install the configuration PHP environment

1, download PHP, official address: Http://windows.php.net/download/, 
2, Unzip the downloaded zip archive to the D drive and unzip it for E:\php;  
3, go to Control Panel >> Administrative Tools >>internet Information Services (IIS) Manager,  
4, Middle window Select Handler mappings double-click, and then right-most select Add Module mappings

5. "Executable" in the column to find the PHP installation directory E:\php, the lower right corner of the file type to "EXE" can see "Php-cgi.exe" file appears



6. You can then add default documents to the Web site: default.php and index.php.

The following configuration is also needed:

7. Enter the E:\php directory, rename the file php.ini-development renamed to PHP.ini and copy to the desktop;

8. The following need to modify the desktop php.ini file,

after opening the php.ini file, use the shortcut key Ctrl+f search Data.timezone Modify the current time zone to data.timezone= "Asia/shanghai"
Activate the extension options you need, the semicolon ";" before the corresponding DLL statement. Delete

extension=php_gd2.dll  
Extension=php_mbstring.dll 
extension=php_mysql.dll< Span class= "Apple-converted-space" >&NBSP;
Extension=php_pdo_mysql.dll


Then search extension_dir= to modify it to Extension_dir = "E:\php\ext\", modify and check it, save it, and then cut this php.ini file on the desktop to C # Windows directory can be (why do not directly copy the file here to modify it, because Windows 8 involves permissions issues, so first copy to the desktop modification, of course, can also be placed in other directory modification)

9.php environment configuration, we can test, in the establishment of the site directory to create a new index.php file (note is index.php, not index.php.txt), the content is "<?php phpinfo (); > ", then open" localhost "in the browser, you can see a similar interface like the following

PS1: (in the command line into the PHP installation directory, enter the "php-m" command to view the DLL extensions that are turned on)

How to configure the PHP runtime environment in Windows 8 IIS

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.