How to configure the PHP environment?

Source: Internet
Author: User
Tags php website

From: http://www.phpweblog.net/tanqimin/archive/2007/07/01/1424.aspx

The method for configuring the PHP environment on the internet is ineffective. I decided to write one by myself and forget it!

(1) download Apache 2.x, PHP 5.x, and MySQL 5.x first.

(2) install Apache (Note: If your system is installed with IIS or other Web servers, stop working first). After the installation is complete, access http: // localhost and a message indicating that the server is working

(3) install mysql. Remember the password.

(4) refer to the official PHP website:

A. decompress the compressed package to the D:/PHP/folder (you can select another disk)

B. Copy PHP. ini-recommended from D:/PHP/to the Windows folder and rename it PHP. ini.

C. Open PHP. ini and change php_gd2.dll, php_mysql.dll, php_mysqli.dll, and php_xsl.dll to extension (simply remove the semicolons in front of them)

D. It is recommended to send an error report in the development environment (this step is optional), locate error_reporting in PHP. ini, and change it to error_reporting = e_all.

E. Copy php5ts. dll and libmysql. dll under D:/PHP/to the System32 folder of windows.

F. Copy php_gd2.dll, php_mysql.dll, php_mysqli.dll, and php_xsl.dll under D:/PHP/EXT/to the System32 folder of windows.

G. Open the Apache configuration file httpd. conf, find many loadmodule entries, and add the following content:

Loadmodule php5_module D:/PHP/php5apache2_2.dll

Locate <ifmodule mime_module> and add the following content in the corresponding location:

Addtype application/X-httpd-PHP. php

H. Find the directoryindex entry and change it to the following:

Directoryindex index.html. var index. php

I. Save the file and restart the Apache server.

J. in the C:/program files/Apache Software Foundation/apache2.2/htdocs directory (this is the default path of the website. You can modify the configuration by searching this part and changing it to the actual path, note:/must be replaced with/) to delete the original file and create a new file named index. the content of the PHP file is as follows: <? PHP
Phpinfo ();
?>

K. Finally, enter the URL http: // localhost/index. php In the browser, and you will see the page for PHP information.

(5) Congratulations, configuration successful!

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.