Assemble PHP environment

Source: Internet
Author: User
Is PHP decompressed, not installed? 1. in the PHP installation directory, find the php5ts. dll file and copy it to the C drive system32 directory. 2. in the PHP installation directory, find the file libmysql. dll and copy it to the C drive system32 directory. 3. install the PHP environment in PH

PHP is an decompressed version, not an installed version

?

1. in the PHP installation directory, find the php5ts. dll file and copy it to the C drive system32 directory.

2. in the PHP installation directory, find the file libmysql. dll and copy it to the C drive system32 directory.

3. in the PHP installation directory, find the php. ini file and copy it to C: \ windows.
?? This file is the basic file for configuring PHP. for example, you can set the server root directory configuration and open php in a text editor. in the INI file, find "doc_root =" because I installed Apache under the root directory of drive D by default. Therefore, modify the value of this configuration item to doc_root = c: \ htdoc.

4. in php. in ini, find "extension_dir = ". /"", this configuration item is used to load the PHP Extension Module. modify this configuration item as follows: extension_dir = c: \ php5 \ ext (you need to modify the PHP loading location according to your own installation directory)

5. find "; extension = php_mysql.dll" in php. ini and remove the semicolon to make the entry take effect. This configuration item is used to make PHP support MySQL. here, the semicolon serves as a comment. After modifying the PHP configuration file php. ini, save and exit the file.

6. configure Apache. Go to the conf directory under the Apache installation directory and open the Apache configuration file http. conf in the text editor. Find the dynamic shared object (DOS) Support in this file, and add the following configuration item at the end of the LoadModule line: LoadModule php5_module d:/php/php5apache2. dll, (you need to modify the PHP loading location according to your own installation directory ). This item is loaded into the PHP module php5apache2. dll through Apache, that is, PHP runs with a module of Apache.
Example:
LoadModule php5_module C:/php5/php5apache2_2.dll
PHPIniDir "C:/php5"

?

Set ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"

And

Both are changed to c: \ htdoc

7. in order for Apache to support files with the. php suffix, find the AddType item in http. conf and add the following configuration item at the end: AddType application/x-httpd-php.php. Find the directoryIndex and add index. php at the end.
To support Chinese, find AddDefaultCharset ISO-8859-1 to adddefacharcharset GB2312. Save http. conf after modification. This completes the basic configuration of Apache. (This seems unnecessary)

If the tomcat proxy is used in the apache configuration file, you need to filter the directories directly accessed by apache.
# In the apache root directory
ProxyPass/discuz!
ProxyPass/limesurvey!
ProxyPass/clubupload!
ProxyPass/ikeaupload!
ProxyPass/21 days!
ProxyPass/fordclub!
ProxyPass/ajp: // 127.0.0.1: 8009/
ProxyPassReverse/ajp: // 127.0.0.1: 8009/

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.