Set up a php environment in xp to install and configure php

Source: Internet
Author: User
: This article describes how to set up and install php in the php environment in xp. if you are interested in the PHP Tutorial, refer to it. Here and the previous release of Baidu Cloud Download link: http://pan.baidu.com/s/1jGZ8xVK

If you want to try the download process, see the following:

Php official website download URL: http://windows.php.net/download/

Click it and pull it to the bottom of the webpage:


After the download is complete, decompress the package to the appropriate directory.

You also need to start the configuration below:

A) php. ini-development is php. ini.


B) open the php. ini file and cancel the comments of the following lines.

Extension = php_curl.dll
Extension = php_mysql.dll
Extension = php_mysqli.dll
Extension = php_pdo_mysql.dll
Extension = php_soap.dll

C) set the time zone

Keyword: date. timezone

For example, modify it to date. timezone = PRC.

D) the relationship between apache and php should be associated at this time.

Open httpd. conf under the Directory Apache24 \ conf \

Find the corresponding location according to the keyword: # LoadModule, and add the following two lines of code under the corresponding location:

LoadModule php5_module "E:/setup/xp/php5.4/php5apache2_4.dll"
PHPIniDir "E:/setup/xp/php5.4 /"

The above two lines of code mean loading the php module and notifying apache of the php configuration file.

E) add suffixes that can be parsed

Find AddType application/x-compress. Z based on the keyword

Then add the following three lines of code:

AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
AddType application/x-httpd-php. htm

F) test code

In this article, we have configured the apache's root directory to create a new. txt file. Phpinfo ();
?>

After saving and disabling, change the suffix to. php.


Restart the server. let's experiment in the browser!


Environment configured successfully!

The above describes how to set up and install php in the php environment in xp, including some content, and hope to help friends who are interested in PHP tutorials.

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.