- Code: Select all
... [core:warn] ... AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
I only have Apache, Mysql, and Tomcat installed. The httpd.pid is simply not being deleted by XAMPP at the end of a session. To eliminate other possible causes, I did a fresh installation of the current XAMPP on a different computer (with Windows 8.1) and only installed Apache and Mysql. When I use the XAMPP control panel (v3.2.1), the httpd.pid is created in the location indicated above when I press the [Start] button and Apache loads, but when I then press the [Stop] button, the httpd.pid is not deleted.
HOWEVER:
If--instead--I click on [Shell], which provides a command prompt, and I then enter:
apache_start
...it starts Apache using the apache_start.bat file. The XAMPP control panel shows that Apache is running, and displays the PIDs and ports being used; the control panel's [Start] button accordingly changes to [Stop] so that--if I wish--stop Apache by pressing that button.
But here's the proof that the problem is with the control panel:
If I press the [Stop] button after initiating Apache using the apache_start.bat file at the prompt, the httpd.pid is *NOT* deleted.
On the other hand, if I simply close the CMD window in which I ran the apache_start.bat file to start Apache, THE HTTPD.PID *IS* DELETED.
I've studied the batch files that are called with you use the apache_start.bat file to initialize Apache, and they are designed to delete the httpd.pid file at the end of processing. And, as I just described, the file is in fact deleted when you terminate the session by closing the CMD window (which is a real hackish way to do it, but that's what XAMPP instructs you to do; the batch-file start-up process should work differently; I consider that an embarrassing design flaw). Be that as it may, this does prove that the XAMPP control panel is the culprit.
I've combed the internet looking for a resolution to this problem, which has affected a lot of people, and the typical answer is "one of the DLLs in the PHP.INI file needs to be commented out." That's simply not true; the problem is very simply that the XAMPP control panel's [Stop] procedure has a coding error.
I had hoped that the control panel merely ran the batch files, and that if I found the correct batch file, I could edit it to delete the httpd.pid file at the end of processing, but the batch files are in fact constructed to do that very thing, and the Control Panel isn't invoking them; it's performing the Start-up and Shut-down process with its own processes.
Could the person responsible for the coding of the Control Panel please be alerted that there's an oversight in its code that's preventing the httpd.pid file from being deleted during the Stop procedure for Apache? It's not in the Apache engine, for the batch file method of starting and stopping does in fact delete the httpd.pid file. I would be happy to beta-test the revised Control Panel EXE.
Please comment...
Many thanks,
Tom