Apache Error: Apache shutdown unexpectedly.

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

Apache Error: Apache shutdown unexpectedly.

Postby emidio59dg » 04. January 2020 18:11

in start apache I get the error below:
17:48:32 [Apache] Checking default ports...
17:48:32 [Apache] Attempting to start Apache app...
17:48:32 [Apache] Executing "d:\xampp\apache\bin\httpd.exe"
17:48:32 [Apache] Return code: 0
17:48:33 [Apache] Status change detected: running
17:48:37 [Apache] Status change detected: stopped
17:48:37 [Apache] Error: Apache shutdown unexpectedly.
17:48:37 [Apache] This may be due to a blocked port, missing dependencies,
17:48:37 [Apache] improper privileges, a crash, or a shutdown by another method.
17:48:37 [Apache] Press the Logs button to view error logs and check
17:48:37 [Apache] the Windows Event Viewer for more clues
17:48:37 [Apache] If you need more help, copy and post this
17:48:37 [Apache] entire log window on the forums

in the error_log file there is only the line:

[Sat Jan 04 17:48:34.737355 2020] [core:warn] [pid 12208:tid 592] AH00098: pid file D:/XAMPP/apache/logs/httpd.pid overwritten -- Unclean shutdown
of previous Apache run?

running the apache_start.bat file I get the following lines:

D:\XAMPP>apache_start.bat
Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...

D:\XAMPP>

I have already tried changing the default ports 80 and 443 to no avail

thanks for any answer you want to give me
emidio59dg
 
Posts: 1
Joined: 04. January 2020 17:55
XAMPP version: 7.3.6
Operating System: windows 10

Re: Apache Error: Apache shutdown unexpectedly.

Postby arturogr » 06. January 2020 03:06

I did have the same problem, I got in the Control Panel the next log text:

[
07:05:33 p. m. [main] Initializing Control Panel
07:05:33 p. m. [main] Windows Version: Enterprise 64-bit
07:05:33 p. m. [main] XAMPP Version: 7.4.1
07:05:33 p. m. [main] Control Panel Version: 3.2.4 [ Compiled: Jun 5th 2019 ]
07:05:33 p. m. [main] You are not running with administrator rights! This will work for
07:05:33 p. m. [main] most application stuff but whenever you do something with services
07:05:33 p. m. [main] there will be a security dialogue or things will break! So think
07:05:33 p. m. [main] about running this application with administrator rights!
07:05:33 p. m. [main] XAMPP Installation Directory: "d:\xampp\"
07:05:33 p. m. [main] Checking for prerequisites
07:05:34 p. m. [main] All prerequisites found
07:05:34 p. m. [main] Initializing Modules
07:05:34 p. m. [main] Enabling autostart for module "Apache"
07:05:34 p. m. [main] Enabling autostart for module "MySQL"
07:05:34 p. m. [main] Starting Check-Timer
07:05:34 p. m. [main] Control Panel Ready
07:05:34 p. m. [Apache] Autostart active: starting...
07:05:34 p. m. [Apache] Attempting to start Apache app...
07:05:34 p. m. [mysql] Autostart active: starting...
07:05:34 p. m. [mysql] Attempting to start MySQL app...
07:05:35 p. m. [Apache] Status change detected: running
07:05:35 p. m. [mysql] Status change detected: running
07:05:36 p. m. [Apache] Status change detected: stopped
07:05:36 p. m. [Apache] Error: Apache shutdown unexpectedly.
07:05:36 p. m. [Apache] This may be due to a blocked port, missing dependencies,
07:05:36 p. m. [Apache] improper privileges, a crash, or a shutdown by another method.
07:05:36 p. m. [Apache] Press the Logs button to view error logs and check
07:05:36 p. m. [Apache] the Windows Event Viewer for more clues
07:05:36 p. m. [Apache] If you need more help, copy and post this
07:05:36 p. m. [Apache] entire log window on the forums

]

1) I have already changed the ports to the suggested options in the forum for this issue (changing port in the config file for httpd.conf [from port 80 to 8080, there are 2 or 3 lines that have the 80 number] and for httpd-ssl.conf [from 443 to 10443 port, change all the 443 number for 10443], and I also changed this ports in the Control Panel at the "config" button and then in the "service and port settings"). Then I tried to start Apache alone from the command line using adminstrative rights ("executing as administrator" the "apache_start.bat" file in the xampp directory), and I got this:

[
Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...
AH00526: Syntax error on line 94 of D:/xampp/apache/conf/extra/httpd-xampp.conf:
Argument for 'Require all' must be 'granted' or 'denied'


Apache konnte nicht gestartet werden
Apache could not be started
Presione una tecla para continuar . . .
]

2) Certainlly, once I installed XAMPP, I first changed "httpd-xampp.conf" in line 93 (because I added a new line 94, and commented out the line original 93 with a "#" character) in order to access XAMPP fron other computer at my network:

[
Alias /phpmyadmin "D:/xampp/phpMyAdmin/"
<Directory "D:/xampp/phpMyAdmin">
AllowOverride AuthConfig
# Require local # the original line
Require all granted # added this new line for network access but now with problems
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
]

So I had to set to the original "Require local" line 93, and commented out my unaccepted "Require all granted". By now I have not solved this tiny issue. Apache works now but I can not take control from other computer in my network.

Al this, just to say that, it will be a good idea to try to execute from the command line, the "apache_start.bat" file in the xampp directory, I think you will get a better idea of your issue.

3) Tip: execute the Control Panel as administrator too, from the XAMPP directory use "xampp-control.exe", right-mouse-click over the file name at the file-manager and use "execute as administrator" option.

Regards.

Art.
arturogr
 
Posts: 1
Joined: 06. January 2020 01:04
XAMPP version: 7.4.1-0-VC15
Operating System: Windows 10 enterprise 64 bits

Re: Apache Error: Apache shutdown unexpectedly.

Postby Altrea » 06. January 2020 06:53

Hi,

I have had no problems adding the Require all granted line for phpmyadmin the way you described.
Maybe you've had a typo in it. Please double check.

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

Re: Apache Error: Apache shutdown unexpectedly.

Postby Nobbie » 06. January 2020 12:49

You cannot append a comment to a configuration line, the comment character '#' MUST BE the first character in the line ONLY. Only whole lines can be comments.

Therefore

Code: Select all
Require all granted # added this new line for network access but now with problems


is an error, remove the wrong comment part:

Code: Select all
Require all granted
Nobbie
 
Posts: 13214
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 133 guests