


Apache cannot start after connecting to PHP problem solving ideas_PHP tutorial
Apache cannot be started after connecting to PHP.
This article mainly introduces the ideas and solutions to the problem that Apache cannot be started after connecting to PHP. It is simple and practical, and it can be used by those who need it. Partners can refer to it.
Problem: apache was normal before, but failed to 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 path 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, nor a problem with 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, and 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.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.
