_php Tutorial for configuring PHP Environment graphics method under Windows IIS

Source: Internet
Author: User
Tags configuration php phpinfo vc9
This article to introduce to you in the Windows system IIS7 configuration PHP Environment of several methods, there is need to know the friend can refer to, here I take PHP5.2.17 and PHP5.3.5 as an example, IIS7 configuration PHP5.3.5 and PHP5.2.17 method.

Go to official website to download

PHP5.2.17 Official Download: Http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip
PHP5.3.5 Official Download: Http://windows.php.net/downloads/releases/php-5.3.5-Win32-VC9-x86.zip

Note that must be a thread-safe version, if the security test version of the people do not use, the server will do the security version.

In the php.ini file configuration is we can use the php.ini file if it is a development version, if it is a product or server version we need to use php.ini-production but in php5.2.17 to the application file is php.ini-recommended Oh.

Php.ini-production corresponds to php.ini-recommended
Php.ini-development corresponds to Php.ini-dist

All right, I'll take a look at the text tutorial below.

First install the IIS7 installation of the time to pay attention to three places to play a tick

Note: CGI will be used in iis7+php_5.3.5 environment.

ISAPI extensions and ISAPI filters are iis7+php_5.2.17

Start adding PHP support for IIS below

iis7+php_5.3.5

1. Extract the downloaded php_5.3.5 to the c:php directory (also can be placed elsewhere, but should be modified later)

2. Rename Php.ini-development to PHP.ini

3. Modify PHP.ini Find Data.timezone Modify to Date.timezone = "Asia/shanghai" (must be changed here, or will warn) find Windows extensions to open the required modules, such as: Php_ Curl.dll php_mysql.dll php_mysqli.dll php_xmlrpc.dll php_curl.dll Just remove the front semicolon to save it.

4. Add <模块映射>

The path here is filled out according to your actual situation.

5. Create a new phpinfo.php text file in the root directory of the Web site as follows:

Phpinfo ();
?>

6. Test, open the browser to see the results: localhost/phpinfo.php, if you can see a page similar to the following shows that you have succeeded:

Well, it is now possible to run the PHP program successfully.

iis7+php_5.2.17

The ISAPI extensions and ISAPI filters have been selected for the previous installation of IIS, so there is no need to add the role service and start directly

Modify the php.ini file first:

C:php under the php.ini-dist (need to set the display extension) renamed to PHP.ini, open with Notepad to find Extension_dir = "./", and then put the inside./Change to c:php (modify the path according to your actual situation)

1. Add an application pool

2. Add ISAPI and CGI restrictions

3. Add an ISAPI filter

4. Add a script map

5. Test (previously created phpinfo.php) Open localhost/phpinfo.php view effect as before:

Add the following in the Apache+php configuration method

1.Apache configuration PHP Personally think the first thing to pay attention to is the Apache and PHP version information, different versions of the parameters to be set is different, the beginning of the blind let oneself suffered.
2. Select version: Apache 2.2.14 php:5.2.5 details are not detailed ...
3. Verify that Apache and PHP are installed successfully:
(1) Apache:http://localhost
(2) PHP: Running php-i in a DOS window
4.PHP configuration file PHP.ini
(1) Modification:

The code is as follows Copy Code
Extension_dir = "./"
Extension_dir = "C:/Program files/php/ext" (The path of the EXT subdirectory under the actual directory where you installed PHP)

(2) Uncomment to support MySQL database

The code is as follows Copy Code
Extension=php_mysql.dll
Extension=php_mysqli.dll

(3) Environment variables:

The code is as follows Copy Code
Phprc:c:program filesphp
Path added: C:Program filesphp

Copy the file Liblibmysql.dll into the C:windowssystem32
(This step is not carried out may be reported Httpd.exe error)
5.Apache configuration file httpd.conf
(1) Add support for PHP

The code is as follows Copy Code
LoadModule php5_module "C:/Program Files/php/php5apache2_2.dll"
Phpinidir "C:/Program files/php"

(2) The actual work of the directory:

The code is as follows Copy Code
DocumentRoot "F:/apchework"


Options FollowSymLinks
AllowOverride None
Order Deny,allow
Allow from all

(3) Add support for index.php

The code is as follows Copy Code

DirectoryIndex index.php index.html

(4) Add type support

The code is as follows Copy Code

AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
AddType application/x-httpd-php. php. phtml. php3. PhP4
AddType Application/x-httpd-php-source. Phps


Friendship tips, according to our experience if you are IIS7 to use PHP5.3.5 vc9 compiled, if you are apache2.2 use php2.1.7 compile the bar, about this specific can be downloaded to the official website,

http://www.bkjia.com/PHPjc/629829.html www.bkjia.com true http://www.bkjia.com/PHPjc/629829.html techarticle this article to introduce to you in the Windows system IIS7 configuration PHP Environment of several methods, there is need to know the friend can refer to, here I take PHP5.2.17 and PHP5.3.5 as an example, IIS7 configuration p ...

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