Install PHP 5.2.6 in the Windows XP environment.

Source: Internet
Author: User
PHP Installation

Install PHP 5.2.6 in the Windows XP environment.

convert to Traditional Chinese

This section describes how to install PHP in a Windows XP environment.

Before you install PHP, verify that Apache HTTP Server is installed. How to install Apache HTTP server, see Apache HTTP Server installation.

Download PHP 5.2.6

The official website of PHP is http://www.php.net/.

The download page for PHP is http://www.php.net/downloads.php, please select the PHP 5.2.6 installer link under Windows Binaries and select a mirror site (e.g. cn2.php.net) to download P HP, you will get a setup file named Php-5.2.6-win32-installer.msi.

Installing PHP 5.2.6 in a Windows XP environment

Double-click the PHP installation file Php-5.2.6-win32-installer.msi and you will see the following screen:

Click Next to start the installation and select I Accept the terms in the License agreement on the License page, such as:

Click Next to enter the Destination Folder screen, such as:

Click Next to go to the Web Server Setup screen and select the Apache 2.2.x Module, such as:

Click Next to select the directory where the Apache configuration file is located, such as:

By default, the text box displays the C:\Program files, and you remember to select the Apache profile directory yourself via the Browse button.

After selecting the Apache profile directory, click Next and select the features you want to install, such as:

Click Next to prepare to install PHP, such as:

Click the Install button to perform the installation.

When the installation is complete, the installation End screen is displayed, such as:

Click Finish to end the installation.

Modifying the Apache configuration file

After the installation, we also need to modify the Apache configuration file. File path is

C:\Program Files\apache software foundation\apache2.2\conf\httpd.conf.

With Notepad open httpd.conf, you will notice that at the end of the file there is a #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL configuration code for the end to begin with #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL .

Please update this code to:

#BEGIN PHP INSTALLER edits-remove only on Uninstallphpinidir "C:/Program files/php/" LoadModule php5_module "C:/Program F Iles/php/php5apache2_2.dll "AddType application/x-httpd-php. Php#end PHP INSTALLER edits-remove only on UNINSTALL

Save Apache Config file httpd.conf.

Open Apache Service

In the Windows Start menu, select Start---all Programs-Apache HTTP Server 2.2----Monitor Apache Servers, and after you click, you'll see in taskbar there A small red icon, double-click the icon to open the Apache Service Monitor screen.

If the Apache service does not start, click the Start button to open the Apache service, and if it is already activated, click the Restart button to restart the Apache service.

Test PHP

Write one of the simplest PHP files with Notepad, save them as test.php, and store them in the Apache htdocs directory.

 
  

Then enter http://localhost:8080/test.php in the browser, the page should appear only "blabla.cn" word, not the source code.

?Author or editor: Rag cloth?? Last modified: 2008-05.-16Reference Source: www.BlaBla.cn
  • 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.