PHP environment configuration encountered in a variety of problem-solving methods: Cannot load Php5apache2_2.dll into server____php

Source: Internet
Author: User
Tags sha1 fully qualified domain name
I use the environment and version:

Windows XP

Httpd-2.2.22-win32-x86-no_ssl.msi

Php-5.2.17-win32-vc6-x86.msi (Select module: Apache 2.2.x module)



Win32 Binary without crypto (no mod_ssl) (MSI Installer): Httpd-2.2.22-win32-x86-no_ssl.msi [PGP] [MD5] [SHA1]

Download Address: http://httpd.apache.org/download.cgi



VC6 x86 Thread Safe (2011-mar-22 13:29:30)

Installer [20.41MB]
sha1:710a69733aa280f22c86e8b868c51f5796f0a390

Download Address: http://windows.php.net/download/



resolution Date: 2012-1-12 11:13:47


Question 1:

can not start Apache, no installation Services.

resolve: To cmd command line: Typing

e:

CD E:\php\soft\Apache2.2\bin

httpd.exe-k Install

httpd.exe-k Start


Question 2:

Start Service is an error: Windows cannot start Apache2.2 on the local computer. For more information, check the system event log

The requested operation has failed

Cannot load E:/php5apache2_2.dll into server


I thought it was 8080 ports occupied.

First Use the command line to find the process number PID that occupies the port

Netstat-an-p Tcp-o

Results did not find the corresponding process


later entered the E:\php\soft\Apache2.2\conf\httpd.conf, modifying the brackets for 8081

Listen 8081

But it's not going to work.



this morning once again configured the PHP environment, almost every configuration will encounter problems, the following is the solution:


Open: E:\php\soft\Apache2.2\conf\httpd.conf

The cursor jumps to the bottom:


#BEGIN PHP INSTALLER edits-remove only on UNINSTALL
Phpinidir ""
LoadModule php5_module "Php5apache2_2.dll"
#END PHP INSTALLER edits-remove only on UNINSTALL


e:\php\soft\apache2.2\bin>httpd.exe-k Start

Httpd.exe:Syntax error on line 495 of e:/php/soft/apache2.2/conf/httpd.conf:cannot load E:/php5apache2_2.dll into SE RVer: \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3


If modified to:

#BEGIN PHP INSTALLER edits-remove only on UNINSTALL
Phpinidir "e:/php/soft/php"
LoadModule php5_module "/php5apache2_2.dll"
AddType application/x-httpd-php. php
#END PHP INSTALLER edits-remove only on UNINSTALL


E:\php\soft\apache2.2\bin>httpd.exe-k start
Httpd.exe:Syntax error on line 495 of e:/php/soft/apache2.2/conf/httpd.conf: cannot load E:/PHP/SOFT/APACHE2.2/PHP5 Apache2_2.dll into server:

\xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3


A look to know where the problem, the original /php5apache2_2.dll This sentence, Apache thought DLL is in their own directory, and high on the e:/php/soft/php/ , so to use absolute path:

Modified to:

#BEGIN PHP INSTALLER edits-remove only on UNINSTALL
Phpinidir "e:/php/soft/php/"
LoadModule php5_module "E:/php/soft/php/php5apache2_2.dll"
AddType application/x-httpd-php. php
#END PHP INSTALLER edits-remove only on UNINSTALL


Reboot

E:\php\soft\apache2.2\bin>httpd.exe-k start
Httpd.exe:Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName

Wow, actually the server started, burst into tears!!! ~~

and solve a small problem does not matter, the solution: As long as the/conf/httpd.conf file #servername before the # removed, and then restart the service is good.


PHP test page:

E:\php\soft\Apache2.2\htdocs\test.php

Content:

<?php 
phpinfo ();
? >

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.