APACHE2.02 + PHP5 + mysql5 Configuration

Source: Internet
Author: User
The machine was formatted and reinstalled the other day. Upload, andIneedtorebuiltit. copy the configuration process from the Internet for later use: (1) http. conf run PHP directly as a module of apache: LoadModulephp5_moduleC: phpphp5apache2. dll

The machine was formatted and reinstalled the other day, so the environment which had configured before is damaged, and I need to rebuilt it. copy the configuration process from the Internet for future use: (1) http. conf runs PHP directly as a module of apache: LoadModule php5_module C:/php/php5apache2. dll //

The machine was formatted and reinstalled the other day, so the environment which had configured before is damaged, and I need to rebuilt it.

Copy the configuration process from the Internet for future use:

(1) http. conf
Run PHP directly as a module of apache:
LoadModule php5_module "C:/php/php5apache2. dll" // set it to the directory of php5apache2. dll, which is assumed to be in c:/php
AddType application/x-httpd-php. php
  
A www directory is created under the Apache directory to store site files. In http. conf:
Change DocumentRoot "D:/Apache2/htdocs" to DocumentRoot "D:/Apache2/www"
Direct column directory:
Options FollowSymLinks
AllowOverride None
Changed:
Options Indexes FollowSymLinks
AllowOverride None
Set the default character to simplified Chinese characters:
Adddefacharcharset GB2312
Restart apache
  
(2) php. ini
Copy php. ini-dist to C:/windows and rename it php. ini.
Extension_dir = "C:/php/ext" // extended storage directories such as php_mysql.dll
Remove the following semicolon to support mysql:
; Extension = php_mysql.dll
Copy libmysql. dll and libmysqli. dll in the php Directory to windows/system32.
Restart apache

2. How to display detailed errors

Modify php. ini to change error_reporting = E_ALL

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.