PHP cannot be started after PHP is configured in Apache

Source: Internet
Author: User
Tags phpinfo
The version of PHP is: 5.2.17
Configuration file Code:
LoadModule Php5_module D:/php/php5apache2_2.dll
AddType application/x-httpd-php.php
Phpinidir "d:/php"
The download is a compressed package, installed in the d:/php

Status: The requested operation has failed
How to solve it?


Reply to discussion (solution)

Check Apache logs

You install the Apache directory \apache\logs\error.log

Log content

Asynchronous AcceptEx failed.
[Mon May 20 13:15:20 2013] [Notice] Child 3328:

Released the start mutex
[Mon May 20 13:15:21 2013] [Notice] Child 3328:all

Worker threads has exited.
[Mon May 20 13:15:21 2013] [Notice] Child 3328:child

Process is exiting
[Mon May 20 13:21:11 2013] [Warn] PID file

C:/Program Files (x86)/apache

Group/apache2/logs/httpd.pid overwritten--unclean

Shutdown of previous Apache run?
[Mon May 20 13:21:11 2013] [Notice] apache/2.0.64

(WIN32) configured--Resuming normal operations
[Mon May 20 13:21:11 2013] [Notice] Server built:oct

18 2010 01:36:23
[Mon May 20 13:21:11 2013] [Notice] parent:created

Child process 1696
[Mon May 20 13:21:11 2013] [Notice] Child 1696:child

Process is running
[Mon May 20 13:21:11 2013] [Notice] Child 1696:

acquired the start mutex.
[Mon May 20 13:21:11 2013] [Notice] Child 1696:

Starting worker threads.
[Mon May 20 13:21:29 2013] [ERROR] [Client 127.0.0.1]

File does not exist:e:/web/myweb/feng.html
[Mon May 20 13:21:30 2013] [ERROR] [Client 127.0.0.1]

File does not exist:e:/web/myweb/feng.html
[Mon May 20 13:21:52 2013] [ERROR] [Client 127.0.0.1]

File does not Exist:e:/web/myweb/febo
[Mon May 20 13:21:56 2013] [ERROR] [Client 127.0.0.1]

File does not Exist:e:/web/myweb/febo
[Mon May 20 13:21:57 2013] [ERROR] [Client 127.0.0.1]

File does not Exist:e:/web/myweb/febo
[Mon May 20 13:22:52 2013] [ERROR] [Client 127.0.0.1]

File does not exist:e:/web/myweb/\xe9\xa3\x8e

\xe5\xb8\xae\xe7\xbd\x91, referer:http://localhost/
[Mon May 20 13:22:54 2013] [ERROR] [Client 127.0.0.1]

File does not exist:e:/web/myweb/\xe9\xa3\x8e

\xe5\xb8\xae\xe7\xbd\x91, referer:http://localhost/
[Mon May 20 13:51:37 2013] [Notice] Parent:received

Restart Signal--restarting the server.
[Mon May 20 13:51:37 2013] [Notice] Child 1696:exit

Event signaled. Child process is ending.
[Mon May 20 13:51:37 2013] [Crit] Apache is running a

Threaded MPM, but your PHP Module was not compiled

To is Threadsafe. You need to recompile PHP.
Pre-configuration failed
[Mon May 20 13:51:37 2013] [Warn] (OS 995) due to thread fallback

The I/O operation was aborted or requested by the application. : winnt_accept:

Asynchronous AcceptEx failed.
[Mon May 20 13:51:38 2013] [Notice] Child 1696:

Released the start mutex
[Mon May 20 13:51:39 2013] [Notice] Child 1696:all

Worker threads has exited.
[Mon May 20 13:51:39 2013] [Notice] Child 1696:child

Process is exiting

Apache is running a threaded MPM, but your the PHP Module is isn't compiled to be threadsafe. You need to recompile PHP.
Pre-configuration failed


This is the main sentence, refer to:
http://blog.csdn.net/abandonship/article/details/7344918

I changed php-5.2.17-win32-vc6-x86 this version, and then follow the steps on the blog to install, why the installation is not successful,
Do not understand the bottom of this sentence how to change, is to find in the file?
2. Open the php.ini file: (Add or Open)

Extension_dir = "PHP installation directory \ext"

Default_charset = "GBK"

Extension=php_mysql.dll
Want to give a more detailed introduction

Novice words suggest you install a wamp, particularly useful, I am a novice.

Yes, to open php.ini file, modify it.
Extension_dir should not need to be modified, the default installation is already set
Default_charset can be replaced by what you need.
Extension is to find what you want, delete the front semicolon;
After you modify the save and restart Apache (Administrative tools, Services found apache2).
What do you mean by "installation is not successful"?

I follow the Hanshunping PHP video deliberately installed, after successful installation, compared to the downstairs of the main installation situation, pointed out that different.
1.apache configuration file, httpd.conf, Hanshunping teacher configuration (different paths can be ignored);

Phpinidir "f:/ampserver/php"
LoadModule php5_ Module F:/ampserver/php/php5apache2_2.dll

SetHandler application/x-httpd-php

2. Next, we're going to install PHP. After PHP decompression, and did not php.ini this file, you have to do is to change the php.ini-production to PHP.ini (this step is not done?) ).
3. In Apache's Htdoc file, you'd better place a file named info.php the file is
!--? php
phpinfo ();
then you visit the next localhost/info.php, see if there is a table, there is no php,php the following table is not loaded Configuration File This column is not shown php.ini path. If so, the PHP installation was successful.
3. Question After you:
Open php.ini File: (Add or open)
Extension_dir = "PHP installation directory \ext"
Default_charset = "GBK"
extension=php _mysql.dll
Do not understand how to change, because these php.ini modification is mainly for the installation of MySQL. Enable PHP and MySQL to connect.
in more detail, it is recommended that you look at Hanshunping's PHP video tutorial 25th-30 speaking.

I follow the Hanshunping PHP video deliberately installed, after the installation succeeded, compared to the downstairs of the main installation situation, pointed out that different.
1.apache configuration file, httpd.conf, Hanshunping teacher configuration so configured (can ignore the different path);

Phpinidir "f:/ampserver/php"
LoadModule Php5_module F:/ampserver/php/php5apache2_2.dll

SetHandler application/x-httpd-php

2. Next, we're going to install PHP. After PHP decompression, and did not php.ini this file, you have to do is to change the php.ini-production to PHP.ini (this step is not done?) ).
3. In Apache's Htdoc file, you'd better put a file that can be named info.php the file is
Phpinfo ();
Then you visit the next localhost/info.php, see if there is a table, there is no php,php the following table is not loaded Configuration File This column is not shown php.ini path. If so, the PHP installation was successful.
3. The question behind you:
Open php.ini File: (Add or Open)
Extension_dir = "PHP installation directory \ext"
Default_charset = "GBK"
Extension=php_mysql.dll
Do not understand how to change, because these php.ini modification is mainly for the installation of MySQL. Enable PHP and MySQL to connect.
In more detail, it is recommended that you take a look at Hanshunping's PHP video tutorial 25th-30 speaking.

Yes, look at that.

Still unable to start, click Start to appear in the dialog box:
The requested has failed
My installation process:
1.php-5.2.17-win32-vc6-x86 after download to d:/php, then php.ini-recommended this file renamed to PHP.ini, and then configure the php.ini:
Extension_dir = "D:\php\ext"
Default_charset = "GBK"
Extension=php_mysql.dll This sentence to delete the preceding semicolon; copy Php5ts.dll to C:\Windows\System32;
2. Then configure the httpd.conf configuration file as follows:
Phpinidir "d:/php"
LoadModule Php5_module D:/php/php5apache2_2.dll
AddType application/x-httpd-php.php
The configuration file is added below the sentence of #loadmodule Ssl_module modules/mod_ssl.so.
3. View Errors.log errors in logs due to:
Syntax error on line 174 of C:/Program Files (x86)/apache group/apache2/conf/httpd.conf:
Cannot load D:/php/php5apache2_2.dll into server:
That is, unable to connect to the PHP file in the D drive, this is what happened, is installed in the d:/php.
How to solve it?
The Apache version is 2.0.64

Then you'll see if the D:/php/php5apache2_2.dll file exists.
If it exists, check if there is a right of execution.

Apache is running a

Threaded MPM, but your PHP Module was not compiled

To is Threadsafe. You need to recompile PHP.

Your Apache is thread-safe PHP is not

I put on a wamp.

Thank you for your help, until later to learn to a certain extent in their own configuration it

x-httpd-php.php change to x-httpd-php. PHP spaces AH

  • Related Article

    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.