Windows + apache2.2 + php5.2 latest configuration Scheme

Source: Internet
Author: User
Tags php website
1. install Apache 2.2
Download the apache_2.2.3-win32-x86-no_ssl on the Apache official website, double-click the installation, it is best not to install a space path can be installed under C:/apache2.2.

Start Apache and enter http: // localhost in IE. If it works is displayed on a page! Apaceh is running normally.

2. install PHP 5.2
2.1.download php-5.2.0-win32.zip to the official PHP website, decompress the package, change the directory name to PhP5, and copy it to C :/
Put php In the PhP5 directory. ini-Dist is renamed as PHP. copy INI to C:/Windows (or:/winnt depends on the operating system) and set php5ts. DLL and libmysql. DLL to C:/Windows/system32.

2.2. Find extension_dir and add:
Extension_dir = "extension_dir =" C:/PHP/EXT "" // The ext folder in the php5.0 installation directory is used to locate the DLL file
Select some common php dll files in the extension area:

Extension = php_mysql.dll // extension php_mysql.dll. You can use the MySQL statement.

Extension = php_gd2.dll // allow creation and modify the image

Extension = php_ming.dll // SWF support

Extension = php_dbase.dll // maplab requires php_dbase support

These vary from person to person when to add, sometimes to download DLL files

3. Enable Apache to run phpProgram

Modify the C:/apaceh2.2/CONF/httpd. conf file

3.1. Add in the loading module area:

# Add the next line of loadmodule ssl_module modules/mod_ssl.so

Loadmodule php5_module D:/php5.2/php5apache2_2.dll

3.2. Add in the add type area:

In addtype application/X-gzip. GZ. tgz, add

Addtype application/X-httpd-PHP. php

3.3. scr restart ptalias/PHP/"C:/PHP/" // specify the directory of the PHP script. This is not changed.

3. 4. When modifying DocumentRoot, you must modify the two directories.

DocumentRoot "C :/......"

And The paths in the two locations must be consistent. Otherwise, an access denial error will be sent.

3.5. Locate directoryindex:


Directoryindex index. php index. php. var index.htm. var index. xml index. xml. var

There are more Tag.

3.6.adddefacharcharset cannot be found! Apache has used the standard encoding method to estimate character problems.

Save.

Related Article

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.