Assemble PHP environment in win7

Source: Internet
Author: User
Apache is installed in win7 and PHP environment. after php is installed and the http. conf file is modified, the following error occurs when apache is started: >>>httpd.exe: Syntaxerroronline115ofD: Devl win7 is installed in PHP environment.
Apache and mysql have been installed successfully. after php is installed and the http. conf file is modified, the following error occurs when apache is started:
The Apache service named reported the following error:
>>> Httpd.exe: Syntax error on line 115 of D:/Dev/local/apache/conf/httpd. conf: Cannot load D:/local/php/php5apache2_2.dll into server: \ xd5 \ xd2 \ xb2 \ xbb \ xb5 \ xbd \ xd6 \ xb8 \ xb6 \ xa8 \ xb5 \ xc4 \ xc4 \ xa3 \ xbf \ xe9 \ xa1 \ xa3.

Versions of each software:
Apache 2.2.4
Mysql 5.1.56
Php 5.2.0
This error is reported when you install apache on your computer (windows 2003) in the same way. apache is installed on D: \ local \ apache, php is installed in D: \ local \ php. after the software is installed, make the following changes:

Copy all dll files under the D: \ local \ php directory to the windows system folder, that is, C: \ windows \ system32.


Open the apache configuration file http. conf
1. search:
# LoadModule ssl_module modules/mod_ssl.so
Add the following content:
LoadModule php5_module "d:/local/php/php5apache2_2.dll"
2. search:
DirectoryIndex index.html
Replace:
DirectoryIndex index.html index.htm index. php default. php
3. search:
AddType application/x-gzip. gz. tgz
Add the following content:
AddType application/x-httpd-php. php

After Apache configuration is complete, configure PHP and use Notepad to Open C: \ windows \ php. ini.

1. search:
Extension_dir = "./"
Replace:
Extension_dir = "d:/local/php/ext /"
2. search:
Upload_max_filesize = 2 M
This indicates the maximum limit for modifying the file to be uploaded. the default value is 2 Mb, which can be changed to 6 MB.
3. search:
; Extension = php_mbstring.dll
Remove the marker.
4. search:
; Extension = php_gd2.dll
Remove the marker.
5. search:
; Extension = mysql. dll
Remove the marker.
6. search:
; Date. timezone =
Replace:
Date. timezone = PRC


------ Solution --------------------
Syntax error
It is obvious that the modified error is a syntax error.
------ Solution --------------------
It should be the situation mentioned above. I installed it normally under WIN7 and installed a fit package.
------ Solution --------------------
Syntax error on line 115

Check the punctuation marks and spaces in your config file.

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.