On Windows 10, running xampp 7.4.12 from apachefriends.org.
With previous versions of xampp on this machine, starting Apache with xampp-control would display Attempting to start Apache app...
in the lower pane of its window, shortly followed by the message Status change detected: running
, at which point the Apache
modulename in the upper part of the window gets highlighted in green, the PID of the httpd process and port number it's running on appear, and the Start
button label changes to Stop
.
With this version of xampp, that's the way the Start
button for MySQL works, but Apache never turns green, and its button never changes to Stop
. HOWEVER, using the Netstat
button, I can see that httpd.exe starts running on port 80 for addresses 0.0.0.0 and 127.0.0.1. The line for 127.0.0.1 disappears in a couple of seconds, but the line for 0.0.0.0 stays there, and I can browse to the sites on localhost okay. But since there's no Stop
button for Apache, the most convenient way to stop it that I've found so far is to have Process Explorer running in another window, and click Netstat
to find the PID for the process listening on port 80 (quick to sort by port number), and then use Process Explorer (sorted on PID) to kill the PID.
Anyone else seen this behavior with xampp-control
and know what causes it and/or how to fix it? I guess maybe the source code for xampp-control
might yield a possible cause without too much difficulty, but since I'm not set up to build it from source (I only have Cygwin/gcc), it's not clear how that would help me.
EDIT: I realize I didn't include any log or configuration files (because there wasn't anything of interest in the log file, and the configuration does work fine). But for the record, here is what appears in the apache error log when I start it:
[Sun Dec 06 13:13:05.429979 2020] [mpm_winnt:notice] [pid 230288:tid 708] AH00455: Apache/2.4.46 (Win64) PHP/7.4.12 configured -- resuming normal operations
[Sun Dec 06 13:13:05.429979 2020] [mpm_winnt:notice] [pid 230288:tid 708] AH00456: Apache Lounge VC15 Server built: Oct 3 2020 12:58:33
[Sun Dec 06 13:13:05.429979 2020] [core:notice] [pid 230288:tid 708] AH00094: Command line: 'c:\\xampp7412\\apache\\bin\\httpd.exe -d C:/xampp7412/apache'
[Sun Dec 06 13:13:05.438975 2020] [mpm_winnt:notice] [pid 230288:tid 708] AH00418: Parent: Created child process 228772
[Sun Dec 06 13:13:07.208885 2020] [mpm_winnt:notice] [pid 228772:tid 660] AH00354: Child: Starting 150 worker threads.
And this is what appears in the lower half of the xampp-control window:
1:13:03 PM [Apache] Attempting to start Apache app...
Well, it turned out my problem was solved by running xampp-control.exe as administrator.
Doing that caused the module name to get highlighted, its two PIDs to be displayed, along with the port (80, I did not include SSL in the configuration), and the Start button changed to Stop.
While I had seen some vague warnings that sometimes it was necessary to run xampp-control as administrator, I had assumed that if not doing so caused a problem, there would be some kind of error displayed or logged somewhere. And I don't believe I had ever run it as administrator under my previous version of xampp, 1.8.2.