Troubleshoot issues that apache/php cannot start

Source: Internet
Author: User
Tags apache error log php compiler vc9

This is the Apache launch will encounter problems, share with you, hope can help you, solve the problem.

Apache/php cannot start in two situations:

1., Apache cannot boot, PHP is not loaded and cannot be started

2. Apache can start, but cannot start after loading PHP

In the first case, most of these are Apache configuration problem, or port 80 is occupied

Use Apache Configuration check:

C:\>d:\apache2.2\bin\httpd.exe-t

Syntax OK

Correct the error based on the error.

if it is 80 port occupancy, this is common in Windows machines and is often preempted by IIS.

Logout IIS services:

Iisreset/stop

Iisreset/disable

sc stop W3SVC

SC delete w3svc

If not IIS, you can use a command to kill a process that has a 80 port:

# Find The process ID that occupies the port

Netstat-ano|find ": 80"

# assume that the process ID is , and view the process name:

TASKLIST/FI "PID eq 2013"

# Kill the process command

taskkill/f/pid 2013

/******** Ruthless split-line *********/

a tree without flowers

Blog:blog.csdn.net/mycwq

/******* ruthless copy *********/

the second most of them are Problems with the PHP compiler:

View Apache error log, there are similar to the following content:

Httpd.exe:Syntax error on line d:/apache2.2/conf/httpd.conf:cannot load D:/php/php5apache2_4.dll into server:%1 \ Xb2\xbb\xca\xc7\xd3\xd0\xd0\xa7\xb5\xc4 Win32 \xd3\xa6\xd3\xc3\xb3\xcc\xd0\xf2\xa1\xa3

The compiler used by php5.5 is vc11,php5.4 and php5.3 is vc9,php5.2 is VC6. Also pay attention to the x86 version, or the x64 version. Currently only php5.5 offers x64 versions, others are only x86 versions.

apache.org downloaded Apache is the VC6 version, otherwise you can install different runtime libraries according to different file instructions.

VC11 Runtime x86/x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=30679 VC10 Runtime x86 version:/HTTP www.microsoft.com/en-us/download/details.aspx?id=5555 VC10 Runtime x64 version: http://www.microsoft.com/en-us/download/ details.aspx?id=14632 VC9 Runtime x86 version: http://www.microsoft.com/en-us/download/details.aspx?id=5582 VC9 Runtime x64 version: HTTP ://www.microsoft.com/en-us/download/details.aspx?id=15336

If you do not know your situation, you can install all the runtime, no longer have to worry about this problem.

if The apache/php is not yet bootable, which is most likely the problem with the Php5_module module:

1, Apache2.0 corresponding PHP module for the Php5apache2.dll

2, Apache2.2 corresponding PHP module for the Php5apache2_2.dll

3, Apache2.4 corresponding PHP module for the Php5apache2_4.dll

in other words, depending on the Php5_module module, you know which Apache the current version of PHP supports

So, There are several situations where the apache/php is matched:

1, php5.2 support Apache2.0 and Apache2.2;

2, php5.3, php5.4 at the same time support Apache2.2 and Apache2.4;

3, php5.5 only support Apache2.4

unless you manually compile the Php5_module module yourself, there are only 3 options available.

Reference:http://blog.csdn.net/mycwq/article/details/17280003

Troubleshoot issues that apache/php cannot start

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.