Windows IIS configuration PHP environment graphics and text method

Source: Internet
Author: User
Tags configuration php ini phpinfo vc9 win32 zip

First to the official website 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 thread safe version of the, if the Hundred security test version of the people do not use, in the server will do a safe version.

In the php.ini file configuration is that we can use the php.ini file if it is a development version, if the 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 graphics and text tutorials below.

First install good IIS7 installation should pay attention to three places to tick

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

ISAPI extensions and ISAPI filters in the iis7+php_5.2.17

The following starts adding PHP support for IIS

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 after the corresponding)

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

3. Modify PHP.ini Lookup Data.timezone Modify to Date.timezone = "Asia/shanghai" (this must be changed, or it will be a warning) 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 semicolon before you save it.

4. Add < Module mappings >

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

5. Create a new phpinfo.php text file in the site root directory:

<?php
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 are successful:

OK, now you can successfully run the PHP program.

iis7+php_5.2.17

The ISAPI extension and ISAPI filter have been selected before IIS was installed, and there is no need to add another role service to 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, with Notepad open to find Extension_dir = "./", and then put the inside of./change to c:php (according to their actual situation to modify the path)

1. Add Application Pool

2. Add ISAPI and CGI restrictions

3. Add ISAPI Filter

4. Add script map

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

Add the following in the Apache+php configuration method

1.Apache configuration Php Personally think that the first thing to note is the version of Apache and PHP information, different versions of the parameters to be set between the different, the beginning of the blind let himself suffered.
2. Select version: Apache 2.2.14 php:5.2.5 details no longer repeat ...
3. Verify that Apache and PHP are installed successfully:
(1) Apache:http://localhost
(2) PHP: Running php-i under DOS windows
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 in the actual directory where PHP is installed)

(2) Uncomment to support MySQL database

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

(3) environment variable:

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

Copy the file Liblibmysql.dll into the C:windowssystem32
(This step does not proceed may report 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"
<directory "F:/apchework" >
<directory "F:/www" >
Options FollowSymLinks
AllowOverride None
Order Deny,allow
Allow from all
</Directory>

(3) Add support for index.php

The code is as follows Copy Code
<ifmodule dir_module>
DirectoryIndex index.php index.html
</IfModule>

(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 on the use of PHP5.3.5 Vc9 compiled, if you are apache2.2 use php2.1.7 to compile the bar, about this specific can go to the official website to download,

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.