Make Apache support the PHP language

Source: Internet
Author: User
Download PHP and unzip the installation package, such as the PHP-5.2.13 version, renamed PHP5.2, and then in PHP5.2 find php. ini-dist copy a copy and name it php. ini. In php. ini, You need to modify several places (1) set the directory where the extension file is located; find extension_dir. In the file and change it to extension_dirc: php5ext

Download PHP and unzip the installation package, such as the PHP-5.2.13 version, renamed PHP5.2, and then in PHP5.2 find php. ini-dist copy a copy and name it php. ini. In php. ini, You need to modify several places (1) set the directory where the extension file is located; find extension_dir =./In the file and change it to extension_dir = c:/php5/ext

Download PHP and unzip the installation package, such as the PHP-5.2.13 version, renamed PHP5.2, and then in PHP5.2 find php. ini-dist copy a copy and name it php. ini. Several changes are required in php. ini.

(1) set the directory where the extension file is located;

Find extension_dir = "./" in the file and change it to extension_dir = "c:/php5/ext /"

(2) enable common extensions

Extension = php_bz2.dll

Extension = php_gd2.dll
Extension = php_mbstring.dll

Extension = php_gettext.dll

Extension = php_mysql.dll
Extension = php_mysqli.dll

Extension = php_pdo_mysql.dll

Extension = php_sockets.dll

Extension = php_xmlrpc.dll

Next, edit the Apache configuration file http. conf to modify the following:

(1) load the module LoadModule php5_module for processing PHP "D: \ Program Files \ php5.4 \ php5apache2_2.dll"

(2) Add recognizable php mime types to Apache

AddType application/x-httpd-php. php

AddType application/x-httpd-source. phps

(3) load the libmcrypt. dll and libmysql. dll class library files

LoadFile c:/php5/libmcrypt. dll

LoadFile c:/php5/libmysql. dll

(4) set the PHP configuration file directory

PHPIniDir "c/php5.4"

So far, PHP and Apache must be configured and can be tested.

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.