XAMPP - Apache failed to start - attempt to start the Apache service

When I tried to start Apache using XAMPP, I got - "Trying to start the Apache service ..." in the XAMPP user interface. There was no additional data.

Where can I see the logs (I ran XAMPP as administrator)?

Apache - Fails to start

+9
source share
14 answers

I realized that this is a port problem since I was running IIS and other web servers on my machine. But I was more interested in seeing a detailed error message with a port number in the user interface.

It seems that it was not registered in the user interface or the log file (at least in my case), but in the event viewer (control panel → View event logs). Under Even viewer → Windows Logs → Application

I could see a permissions error, something like below:

An attempt was made to access a socket that was denied by its access permissions .: AH00072: make_sock: could not bind to address 0.0.0.0-00-0043

To fix this SSL port rights issue, change the line below in httpd-ssl.conf (C: \ xampp \ apache \ conf \ extra)

# When we also provide SSL we have to listen to the standard HTTP port (see above) and to the HTTPS port Listen xxx 

Replace XXX with any valid port number that is open on your computer.

If you are having problems with port 80, modify the httpd.conf file (C: \ xampp \ apache \ conf)

 # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 127.0.0.1:8000 

I also summarized the other solutions that I came across:

  • Most often, Skype blocks the Apache port. So stop it and try again.
  • Find the process identifier (PID) that uses the blocked port (netstat -ano), and kill the corresponding process in the Windows task manager.
+12
source

IF PORT 80 IS NOT A PROBLEM!

Check if port 80 is used first, as this may be a problem. You can do this by typing "netstat -an" in cmd. Look for 0.0.0.0:80 in the Local Address section. If you find that it is being used, follow the solution from @Karthik. However, I had a similar problem, but my port 80 was not used. My XAMPP had the wrong ways, steps to fix this:

1. Determine the version of Apache that you are using, you can find it in the "Services" section ("Control Panel", "Administrator Tools", "Services") and find Apache, in my case it was listed as Apache2.4.

2. Close XAMPP.

3. Run cmd as administrator.

4.execute 'sc delete "Apache2.4"' (put your version instead of mine and without the environment '', but with "" around Apache).

5.execute 'sc delete "mySQL"', delete "" again as you type.

6. Open XAMPP and try starting Apache.

If you are having problems with FileZill, Mercury or Tomcat, you can try this here as well, but I have not tested it myself.

Hope this helps!

+21
source

run xampp (as administrator), (1) right-click C: \ xampp \ xampp-control.exe and run it as administrator. (2) unistall service module, and then install the service module. (3) now try running apache and mysql.

+4
source

Check your DocumentRoot path (in httpd.conf ); a typo can cause this problem.

+3
source

Had the same problem when upgrading to PHP7.2

Problem: First I closed skype and then checked if port 80 is not a problem. How can you check this? See @AlexT Comment above.

In my case, port 80 was not a problem. So now I had to find out what happened. So I checked the error logs Control Panel> Even the Viewer> Windows Logs> Application and found the following error in Apache2.4

httpd.exe: Syntax error on line 520 from C: /xampp/apache/conf/httpd.conf: Syntax error on line 18 of C: /xampp/apache/conf/extra/httpd-xampp.conf: C cannot load : /xampp/php/php7ts.dll to server: Apache name service is not a valid Win32 application.

This means that I installed the wrong version of PHP. In fact, I downloaded the win64 version, while I needed the Win32 version.

So, I downloaded the correct version: Download PHP 7.2.0, extracted it to C: / xampp / php , restarted apache, and it worked :)

+3
source

For those who accidentally (or not) changed one of the .conf files and apache does not start even after trying all of the above solutions.

One easy way to track where the problem is is to start Apache through the command line:

(On Windows): open a command prompt as administrator, then go to the Apache bin folder, next run

httpd to run apache

C: \ XAMPP \ Apache \ Bin \ HTTPD

For my case it was:

apache via cmd

Someone added a virtual host to a specific file that caused the problem. I commented out the lines and Apache was working fine.

+3
source

Running Xampp as a console application (simply by double-clicking xampp_start.exe in the Xampp root folder) was the only thing that worked for me on Windows 10 (without Skype, nor the Word Wide Web Publishing Service). WampServer and UwAmp also did not work.

0
source

My scenario was different after checking all the possible options. If you changed the ports and still get the same problem, then here you can try. This was done on Windows 7.

Step 1: Confirm the cause of the error by choosing "Control Panel" → "System and Security" - "Administrative Tools" → "View Events" → "Windows Logs" → "Application" → "Error". My said: "Apache called the following error:

httpd.exe: Syntax error on line 424 from C: /xampp/apache/conf/httpd.conf: Unable to load c: \ xampp \ php \ php5apache.dll to the server: the specified module was not found. "Therefore, I needed to change \ php5apache.dll to the version of php and apache that I installed, which was php7apache2_4.dll

Step 2: To get the correct name for your .dll php and apache file, go to C: \ xampp \ php. You will see something like php7apache2_4.dll with other files in the folder.

Step 3: Go to C: /xampp/apache/conf/httpd.conf and edit the configuration file and change "c: \ xampp \ php \ php5apache.dll" to "c: \ xampp \ php \ php7apache2_4.dll" in my case. Make sure that you open the file as an administrator, with the exception of the changes.

Step 4: Start the xampp server and everything should work fine. Remember to close the xampp server before making changes to the apache configuration file.

Hope this helps. Hurrah!:)

0
source

I had a hard-coded IP address in httpd.conf and my local IP address changed, which caused my problem, changed IP and everything worked again

0
source

Try installing the xAMPP version for x86. The default version of XAMPP on their website is x64 (possibly because I use x64 Windows 7). download link here

0
source

I had this problem when installing in Program Files, which they do not recommend due to recording problems. This can be a problem only if you are not logged in as an administrator and use the password for installation. I simply deleted and installed in a directory that did not need administrator rights.

0
source

Solution for my specific scenario (it worked a couple of days before it was launched):

There was no problem with port 80, but I did something while I was busy with services and startup.

  1. Type msconfig in the Windows Start menu
  2. Click System Configuration

Screenshot for system setup

  1. On the Services tab, find Apache24 (click "Hide all Microsoft services" in the box at the bottom of the window to make it easier to find)
  2. If its check box is not selected, select it

If this has already been verified, then this guide will not help. However, if so:

  1. Click OK, your computer will need to restart
  2. Try again! In my case, Apache was already working as soon as I opened Xampp
0
source

when i start the xampp control panel normally:

enter image description here

I was running

I cannot start Apache. So, I will start it with the administrator:

enter image description here

I can run Apache

-1
source

Make sure that Apache is not disabled in services (control panel, admin tools, services). If it is disabled, then set it to manual and it should work. This was my case, I found Apache Disabled.

-1
source

Source: https://habr.com/ru/post/1215423/


All Articles