Php cannot be started after php is configured in apache

Source: Internet
Author: User
After php is configured in apache, the php version 5.2.17 cannot be started.
Configuration file code:
LoadModule php5_module d:/php/php5apache2_2.dll
AddType application/x-httpd-php.php
PHPIniDir "d:/php"
Download the compressed package and install it in d:/php.

Status: the requested operation has failed
How can this problem be solved?


Reply to discussion (solution)

View apache logs

The directory where you installed apache \ 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 have 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 250 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

Threaded MPM, but your PHP Module is not compiled

To be threadsafe. You need to recompile PHP.
Pre-configuration failed
[Mon May 20 13:51:37 2013] [warn] (OS 995) due to thread return

The I/O operation has been suspended for outbound or application requests. : 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 have exited.
[Mon May 20 13:51:39 2013] [notice] Child 1696: Child

Process is exiting

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


For more information, see:
Http://blog.csdn.net/abandonship/article/details/7344918

I changed the php-5.2.17-Win32-VC6-x86 version, and then follow the steps on the blog to install, why is the installation still not successful,
I don't know how to change this sentence. is it 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
I hope to give a more detailed introduction.

If you are a newbie, we recommend that you install a wamp, which is especially useful. I am a newbie.

Yes. open the php. ini file and modify it.
Extension_dir should not need to be modified. it is set by default during installation.
Default_charset can be changed to what you need.
Extension is to find what you want and delete the semicolon above;
After the modification is complete, save and restart apache (Management Tools> services find apache2 ).
What do you mean by "unsuccessful installation?

According to Han Shunping's php video, I installed it. after the installation was successful, I pointed out the differences based on the installation information of the landlord.
1. configure the apache configuration file, httpd. conf, and Han Shunping (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 will install php. After php is decompressed, there is no php. ini file. all you need to do is change php. ini-production to php. ini (didn't you do this ?).
3. in apache's htdoc file, you 'd better place a file named info. php.
Phpinfo ();
Then you can access localhost/info. php: Check if there is a table. Is there any php in the table? is there any Loaded Configuration File in the table below php? is php displayed. ini path. If yes, php installation is successful.
3. your question:
Open the php. ini file: (add or open)
Extension_dir = "PHP installation directory \ ext"
Default_charset = "gbk"
Extension = php_mysql.dll
I don't know how to change it, because these php. ini modifications mainly target mysql installation. Connect php and mysql.
For more details, we suggest you take a look at Han Shunping's php video tutorial 25th-30.

According to Han Shunping's php video, I installed it. after the installation was successful, I pointed out the differences based on the installation information of the landlord.
1. configure the apache configuration file, httpd. conf, and Han Shunping (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 will install php. After php is decompressed, there is no php. ini file. all you need to do is change php. ini-production to php. ini (didn't you do this ?).
3. in apache's htdoc file, you 'd better place a file named info. php.
Phpinfo ();
Then you can access localhost/info. php: Check if there is a table. Is there any php in the table? is there any Loaded Configuration File in the table below php? is php displayed. ini path. If yes, php installation is successful.
3. your question:
Open the php. ini file: (add or open)
Extension_dir = "PHP installation directory \ ext"
Default_charset = "gbk"
Extension = php_mysql.dll
I don't know how to change it, because these php. ini modifications mainly target mysql installation. Connect php and mysql.
For more details, we suggest you take a look at Han Shunping's php video tutorial 25th-30.

Good. check it out.

Still unable to start. click start to display the dialog box:
The requested has failed
My installation process:
1. after the php-5.2.17-Win32-VC6-x86 is downloaded, decompress it to d:/php, rename the php. ini-recommended file to php. ini, and configure php. ini:
Extension_dir = "d: \ php \ ext"
Default_charset = "gbk"
Extension = php_mysql.dll: delete the semicolon above; copy php5ts. dll to c: \ windows \ system32;
2. configure httpd. conf. the configuration file is as follows:
PHPIniDir "d:/php"
LoadModule php5_module d:/php/php5apache2_2.dll
AddType application/x-httpd-php.php
The configuration file is added in the # LoadModule ssl_module modules/mod_ssl.so clause.
3. check the error cause of errors. log in logs:
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 to say, you cannot connect to the php file in drive d. what is going on? install it in d:/php.
How can this problem be solved?
Apache version 2.0.64

Then you can check whether the D:/php/php5apache2_2.dll file exists.
If yes, check whether there is execution right.

Apache is running

Threaded MPM, but your PHP Module is not compiled

To be threadsafe. You need to recompile PHP.

Your APACHE is thread-safe, PHP is not

I installed a wamp

Thank you for your help. I will learn how to configure it by myself later.

X-httpd-php.php changed to x-httpd-php. php space 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.