Error: Apache shutdown unexpectedly.

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Error: Apache shutdown unexpectedly.

Postby SpeedyNet » 12. May 2024 00:19

So, I am scratching my head over a problem that occured two days ago. I am not able to start Apache on my XAMPP portable installation. I try to start it from the Control Panel but it just stops again with the message: Error: Apache shutdown unexpectedly. Most of the articles describing this problem assumes that the ports that Apache is trying to listening to is in use by some other program on the computer and that you have a port conflict. Then the suggestion is to change the Apache port to something else. I've run netstat and I am absolutely sure that I don't have anything on my computer with a listening port of 80/443. Just for the fun of it I stll changed the port number to something else, so we can rule out that option.

I can't really see something useful in the event log or apachelog either. Anyone have som tips to how to troubleshoot this?
SpeedyNet
 
Posts: 2
Joined: 12. May 2024 00:11
XAMPP version: 8.2.12
Operating System: Windows 10

Re: Error: Apache shutdown unexpectedly.

Postby Altrea » 13. May 2024 12:50

what is the output of the apache_start.bat script?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11952
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Error: Apache shutdown unexpectedly.

Postby SpeedyNet » 20. May 2024 01:52

Altrea wrote:what is the output of the apache_start.bat script?


Hi there!
Sorry for the late reply. I was struggling a long time with this, but I found out what was the issue. What I did was the following:

1) I downloaded the XAMPP portable version as a zip file
2) I unzipped the file and placed the folder in some custom folder structure
3) I couldn't understand why I got these error messages when I tried to start Apache / MySQL
4) I did try to start Apache and MySQL from the Control Panel. After some troubleshooting I tried to start the two modules with the apache_start.bat and mysql_start.bat files directly instead. Then I got a clue that the paths defined in the configuration files was not correct.
5) I ran the setup_xampp.bat, so the folder settings was configured to point at the custom folder ... and voila everything worked as it should.

If anyone else reads this; As far as I have understood this, the portable version comes with some default paths set in the configuration files. If you run the installer those paths will probably (?) be set during that process. If you just download the .zip file instead and does not run the software from the default location, you need to run the setup_xampp.bat file first.

I am pretty sure this is a common misunderstanding for several people using XAMPP, so hopefully my post can also help someone else that had missed this detail.

Cheers.
SpeedyNet
 
Posts: 2
Joined: 12. May 2024 00:11
XAMPP version: 8.2.12
Operating System: Windows 10

Re: Error: Apache shutdown unexpectedly.

Postby Altrea » 20. May 2024 08:18

Hi,

Thats correct. The zipped versions are preconfigured to run from C:\xampp\
Running the setup_xampp.bat file updates the paths to the current location.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11952
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests