Page 1 of 1

Apache startes but immediately stops.

PostPosted: 21. May 2016 17:17
by mickeymouse
This is the result I get:
11:54:02 AM [Apache] Attempting to start Apache app...
11:54:02 AM [Apache] Status change detected: running
11:54:06 AM [Apache] Status change detected: stopped
11:54:06 AM [Apache] Error: Apache shutdown unexpectedly.
11:54:06 AM [Apache] This may be due to a blocked port, missing dependencies,
11:54:06 AM [Apache] improper privileges, a crash, or a shutdown by another method.
11:54:06 AM [Apache] Press the Logs button to view error logs and check
11:54:06 AM [Apache] the Windows Event Viewer for more clues
11:54:06 AM [Apache] If you need more help, copy and post this
11:54:06 AM [Apache] entire log window on the forums

I did have a computer crash a little while ago and before that, Apache worked fine.
I recovered my computer by restoring to Manufacturer delivery status and then restored my files from back-up I had.

Before going any further, my XAMPP is ver 3.2.2. Should I replace it with the latest version? If I do, will it affect the web code I've already done and will I lose my database?

I looked at the XAMPP ERROR LOG - there is nothing current; the last msg is from April 13:
[Wed Apr 13 01:50:23.007539 2016] [mpm_winnt:notice] [pid 13340:tid 512] AH00354: Child: Starting 150 worker threads.

Same with the ACCESS LOG:
::1 - - [13/Apr/2016:01:51:18 +0200] "POST /homeaccounting/HA_LogInCheck.php HTTP/1.1" 200 2721 "http://localhost/homeaccounting/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"

I note that XAMPP is set to use Port 80.
Netstat shows:
0.0.0.0 80 4 System (I don't know if that has any bearing)

Re: Apache startes but immediately stops.

PostPosted: 21. May 2016 17:59
by mickeymouse
Here is more of msgs I get when starting XAMPP:
12:53:32 PM [Apache] Problem detected!
12:53:32 PM [Apache] Port 80 in use by "Unable to open process" with PID 4!
12:53:32 PM [Apache] Apache WILL NOT start without the configured ports free!
12:53:32 PM [Apache] You need to uninstall/disable/reconfigure the blocking application
12:53:32 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port

I can I find a port and PID to use?
Thanks

Re: Apache startes but immediately stops.

PostPosted: 21. May 2016 18:26
by Nobbie
Enter that error message into Google.

Re: Apache startes but immediately stops.

PostPosted: 21. May 2016 19:10
by Altrea
Hi,

mickeymouse wrote:Before going any further, my XAMPP is ver 3.2.2.

That is NOT your XAMPP version, that is the version number of the control panel component.
=> [Q&A] Insufficient debug information - base information

mickeymouse wrote:12:53:32 PM [Apache] Port 80 in use by "Unable to open process" with PID 4!

There is a sticky for many Apache issues, including your one:
[Q&A] Apache won't start

best wishes,
Altrea

Re: Apache startes but immediately stops.

PostPosted: 26. May 2016 15:58
by mickeymouse
I've tried the various solutions but no success. So I changed the Apache LISTEN ports from 80 to 1180 and 443 to 11443. Apache then starts. However, I know get "HTTP 404 error That's odd...Microsoft Edge cannot find this page " when I try to open my web site - http://localhost/homeaccounting/index.php
I have checked several times - my file index.php is in C:\xampp\htdocs\HomeAccounting

Re: Apache startes but immediately stops.

PostPosted: 26. May 2016 21:13
by Altrea
Read this and you will know why this happens:
[Q&A] Changing the Apache default ports

Re: Apache startes but immediately stops.

PostPosted: 27. May 2016 16:12
by mickeymouse
1000 thanks, Altrea.
Problem resolved.