Three steps to build a PHP environment _ PHP Tutorial

Source: Internet
Author: User
Tags fully qualified domain name
Three steps to build the PHP environment. Set up the PHP environment correctly. 1. install Apache2.2.x: httpd.apache.org and press enter to install Apache2.2.x. Note that after the installation is complete, execute: D: Apache2.2binhtt to set up correctly.

Build a PHP environment 1. install Apache 2.2.x

: Http://httpd.apache.org/

Press enter to install the SDK. After installation is complete, run: D: Apache2.2bin> httpd-k install

Assume that the disk is installed on D.

Installing the Apache2.2 service
The Apache2.2 service is successfully installed.
Testing httpd. conf ....
Errors reported here must be corrected before the service can be started.
Httpd: cocould not reliably determine the server's fully qualified domain name, us
Ing 192.168.28.100 for ServerName

After running the command, open Monitor Apache Servers in the lower right corner of the desktop and start the Apache 2.2 service.

Build a PHP environment II. install PHP

: Http://cn2.php.net/get/php-4.4.9-Win32.zip/from/a/mirror

Download php-5.2.6-Win32.zip

(1) extract the php file to a directory named "D: php ".
(2) copy the PHP. ini-dist under the php Directory (D: php) to the windows directory (some systems are winnt directories) and rename it php. ini.
(3) copy all dll files in the D: php directory to the windows system folder, that is, C: windowssystem32.

Note: If you do not want to copy (3) files, you can add the D: php directory to the system PATH variable.

Build a PHP Environment 3. integrate Apache with PHP

Start Apache HTTP Server 2.2.4 of the program in the menu and go to Configure Apache Server next level. then you can see the Edit the Apache httpd. conf Configuration File. Click.
Search:
# LoadModule ssl_module modules/mod_ssl.so
Add the following content:
LoadModule php5_module "d:/local/php/php5apache2_2.dll"
Search:
DirectoryIndex index.html
Replace:
DirectoryIndex index.html index.htm index. php default. php
Search:
AddType application/x-gzip. gz. tgz
Add the following content:
AddType application/x-httpd-php. php
After Apache configuration is complete, configure PHP and use Notepad to Open C: windowsphp. ini.
Search:
Extension_dir = "./"
Replace:
Extension_dir = "d:/local/php/ext /"
Search:
Upload_max_filesize = 2 M
This indicates the maximum limit for modifying the file to be uploaded. the default value is 2 Mb, which can be changed to 6 MB.
Search:
; Extension = php_mbstring.dll
Remove the marker.
Search:
; Extension = php_gd2.dll
Remove the marker.
Search:
; Extension = mysql. dll
Remove the marker.
Search:
; Date. timezone =
Replace:
Date. timezone = PRC
After the file is modified, double-click the Apache icon in the taskbar in the lower right corner. in the pop-up window, click Stop to Stop the service, and then click Start to Start the service, the status bar of the window shows "Apache/2.2.4 (Win32) PHP/5.2.0 ". The configuration of the PHP environment is complete.


Build PHP environment I. install Apache 2.2.x: http://httpd.apache.org/one way press enter to install. After installation is complete, run: D: Apache2.2binhtt...

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.