Servers that use IIS or Apache for PHP

Source: Internet
Author: User
Tags apache php
Apache Server: install and configure Apache to support Php and install apache in the d: \ website \ Apache Directory. The Apache installation process needs to be entered into the website domain name. you can debug the local application localhost. the installation process is simple and has a full graphical interface.

Aphache servers:

Install and configure Apache to support Php

Install Apache in the d: \ website \ apache Directory. The Apache installation process needs to be entered into the website domain name. you can debug the local application localhost. the installation process is simple and the full graphical interface is not described in detail.

Decompress PHP to the d: \ website \ php directory.
Find the d: \ website \ php. ini-dist file, rename it as php. ini, and copy it to the c: \ windows directory.
Copy the php5ts. dll and libMySQL. dll files in the d: \ website \ php \ directory to the c: \ windows \ system or c: \ windows \ system32 directory.

Compile the d: \ apache \ apache2 \ conf \ httpd. conf file:
First, locate the DocumentRoot line and change the path to the home directory of the web service, for example, DocumentRoot 'd:/website/public_html ';
Find a row of DirectoryIndex and add index.htm index. php at the end of the row, for example, DirectoryIndex index.html. var index.htm index. php.

Install Php for Apache: compile the d: \ apache \ conf \ httpd. conf file:

Find the # LoadModule ssl_module modules/mod_ssl.so line, and add a line after this line:
LoadModule php5_module d:/website/php/php5apache2. dll

Find AddType application/x-gzip. gz. tgz and add three lines after this line:
ScriptAlias/php/'d:/website/php /'
AddType application/x-httpd-php. php
Action application/x-httpd-php '/php/php-cgi.exe'

D:/website/php/refers to the installation directory path of php 5.03. change it as needed.

Restart the Apache service.

By now, the Apache Php environment has been configured. in the web root directory (for example, d: \ website \ public_html \ directory), use notepad to create a phpinfo. the content of the php file is as follows:

   Echo phpinfo ();
?>

Then, openHttp: // localhost/phpinfo. phpIf the Php configuration output information is displayed, it indicates that the configuration is normal.

Run PHP on IIS
1.
Default website -- properties -- home directory -- Configuration -- add
Add extended name ing using a program:
Executable file: C: \ php \ php.exe % s
Extended Name:. php
Selected: Script engine, check whether the file exists
2.
Default website -- properties -- home directory -- Document-add
Index. php


Or:
Default website -- properties -- home directory -- Configuration -- add
C: \ php \ php5isapi. dll
. PHP

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.