Configure the PHP5 development environment in Windows XP

Source: Internet
Author: User
Tags vc9
Document directory
  • Which version do I choose?

Download
(1) Apache
Httpd-2.2.21-win32-x86-no_ssl.msi
(2) PHP
Download Page: http://windows.php.net/download/
Note: The current official website only has two types of versions: 5.3.8 (vc9 compilation) and 5.2.17 (vc6 compilation)
According to the official website

Which version do I choose?

If you are using PHP with Apache 1 or apache2 from apache.org you need to use the vc6 versions of PHP

If you are using PHP with IIS you shoshould use the vc9 versions of PHP

I have selected php-5.3.8-win32-vc9-x86.zipw.php-5.2.17-win32-vc6-x86.zip for separate experiments.

2. install and configure Apache
Installation path F: \ apache2.2.
The default webpage deployment path is F: \ apache2.2 \ htdocs.
Enter localhost in IE to view "It works", indicating that the installation is successful.
You can edit the F: \ Apache2.2 \ conf \ httpd. conf file to modify the webpage deployment path. If this file is not modified, you can use the default webpage deployment path of the system.

3. install and configure PHP
(1) php5.3.8
Decompress the PHP package, decompress the F disk, and rename it to F: \ PHP5.3.8.
Find the php. ini-development file, change it to php. ini, and open it.
Search extension_dir and rewrite it to extension_dir = "F: \ PHP5.3.8 \ ext"
Find doc_root and rewrite it to doc_root = "F: \ Apache2.2 \ htdocs"
Search extension_dir and remove the semicolon before the following options.
Extension = php_mbstring.dll. If this parameter is not selected, a red prompt will appear in phpMyAdmin.
Extension = php_dba.dll
Extension = php_dbase.dll
Extension = php_filepro.dll optional
Extension = php_gd2.dll supports the GD library.
Extension = php_imap.dll optional
Extension = php_ldap.dll
Extension = php_mysql.dll supports MySQL
Copy PHP. ini to c: \ windows, and copy php5ts. DLL to c: \ windows \ system32.
(2) Configure php5.2.17
Open the php. ini-Dist file. The others are similar to php5.3.8 configured above.

4. Configure Apache
Open F: \ apache2.2 \ conf \ httpd. conf
(1) locate the last # loadmodule and add the following code in the next line:
Loadmodule php5_module "F:/php5.3.8/php5apache2_2.dll"
Addtype application/X-httpd-PHP. php
# Configure the php. ini path
Phpinidir "F:/php5.3.8"
Find directoryindexin the 2nd Region, and check index.php after index.html. note that there is a space between index.html and index.html.
(3) Restart Apach

5. Test
Edit a text file with the following content:
<? PHP

Phpinfo ();
?>

Save it as index. php and put it down to the deployment path of the webpage (F: \ apache2.2 \ htdocs)
Enter http: // localhost/index. php in IE to view the PHP configuration page.
This indicates that the configuration is successful.

Reproduced to: http://www.cppblog.com/jack-wang/archive/2011/12/10/161874.aspx

Loaded configuration file

F: \ php5.3.8 \ PHP. ini

 

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.