Home  >  Article  >  Backend Development  >  Apache cannot start after connecting to PHP. Solution to the problem, apachephp_PHP tutorial

Apache cannot start after connecting to PHP. Solution to the problem, apachephp_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:49:43896browse

Apache cannot start after connecting to PHP. Solution to the problem, apachephp

Problem: apache was normal before, but it cannot start after connecting and configuring PHP. After testing with apache Test Configration, the error form is:

Cannot load D:/php/php5apache2_2.dll into server (or php5apache2_4.dll)

My personal solution trajectory is as follows:

1 First check the path during configuration to see if the spelling is correct. No errors were found

2 There has been no problem with apache before, so I think the version downloaded by PHP is wrong. I downloaded 5.6 at the beginning, and the module file inside is php5apache2_4.dll, so I think there is no problem with PHP. I searched on Baidu and found that it is possible. The correct VC library version is missing

3 Then, I checked the file of the php package (it is best to download it from the official website). There was a hint in the file name that it was VC9 (it seemed that I also deleted this package later, but this is not important), and then searched Go to the following paragraph:

The compiler used by php5.5 is vc11, the compiler used by php5.4 and php5.3 is vc9, and the compiler used by php5.2 is vc6. Also pay attention to whether it is the x86 version or the x64 version. Currently, only php5.5 provides the x64 version, and the others only have the x86 version.

The Apache downloaded from apache.org is all vc6 version, otherwise different runtime libraries will be installed according to different file instructions.

vc11 runtime library x86/x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=30679

vc10 runtime library x86 version: http://www.microsoft.com/en-us/download/details.aspx?id=5555

vc10 runtime library x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=14632

vc9 runtime library x86 version: http://www.microsoft.com/en-us/download/details.aspx?id=5582

vc9 runtime library x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=15336

However, after I downloaded and installed the VC library, I thought it would work, but I still got the same error...

4 I deleted the downloaded VC library and tried another download address. It still didn’t work. I downloaded VC10 and it still didn’t work. Damn it!

5 Then, it is definitely not a problem with the VC library or apache, then it is still a problem with PHP. So, I went to the official website and downloaded a lower version of PHP5.3.5. After decompressing it, I found that the module file of this version became php5apache2_2.dll, while the 5.6 version was php5apache2_4.dll. Then I downloaded another PHP version and found that the module file of this version became php5apache2_2.dll. There is no module file, pitfall!

6 So I judged that it might be a problem with this file, so I changed to version 5.3.5. Damn it, it worked!!!

7 I was so happy that I checked a webpage I had opened before. I scrolled down and found a description of how to solve this problem:

If Apache/PHP still cannot be started, it is most likely a problem with the php5_module module:

 1. The PHP module corresponding to Apache2.0 is php5apache2.dll

2. The PHP module corresponding to Apache2.2 is php5apache2_2.dll

3. The PHP module corresponding to Apache2.4 is php5apache2_4.dll

In other words, according to the php5_module module, you can know which Apache is supported by the current version of php

Therefore, the combination of Apache/PHP has the following situations:

1. php5.2 supports Apache2.0 and Apache2.2;

2. php5.3 and php5.4 support both Apache2.2 and Apache2.4;

3. php5.5 only supports Apache2.4

8 Wow, just scroll one more screen to solve the problem earlier. Remember not to be lazy...

The above is the entire content of this article, I hope you all like it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1019069.htmlTechArticleApache cannot be started after connecting to PHP. Solution to the problem, apachephp problem: apache was normal before, but cannot be started after connecting to PHP and configuring it. , the error form after testing with apache Test Configration is:...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn