Apache not running - apache

I need to use Wordpress with XAMPP for a task in a study project.
I installed XAMPP, and now I'm supposed to start MySql and Apache from the Xamp Control Panel.
If I start the panel, it displays:
XAMPP Control Panel Version 2.5.8 (2009-07-28)
XAMPP for Windows Version 1.7.3
Windows 5.1 Build 2600 Platform 2 Service Pack 3
CurrentDirectory: C:\xampp
Status Check OK
If I click on the Start button for the Apache module, the following two lines are added:
Busy...
Apache started
But it's not started. It's still Stopped.
I found this thread, describing the same problem with a solution:
http://www.netshinesoftware.com/component/option,com_myblog/Itemid,65/show,Apache-wont-start-on-XAMPP.html/
But Skype is not running. If i check the ports in cmd with netstat -a -no there is one entry with port 80, but it's from IP adress 0.0.0.0 and the corresponding PID I cannot find in the 'tasklist'
What could be the problem and how can I resolve it?
Thank you!

Look in your error logs to see what Apache says: C:\xampp\apache\logs\error.log
And look at Server Fault; that's a better place for Apache and XAMPP questions: Questions containing 'xampp [apache] wont start' - Server Fault

Related

XAMPP 1.7.7 - Apache won't start (ports already changed)

I installed XAMPP 1.7.7 for testing on the old php version. Current XAMPP is running fine. I changed the ports in httpd.conf from 80 to 8081, and in httpd-ssl.conf from 443 to 4434.
Still, when trying to start apache, I get the error
"error: apache was stopped unexpected. This might be caused by a blocked port, missing dependencies,..."
I also changed these ports again (they were not used in both cases).
I run XAMPP as an administrator and I disabled my firewall without any results... What are other possible options? (Error-)Logs are empty.
maybe the following information might help:
I am using windows 10, xampp 1.7.7 portable, and although I changed the ports, when I run XAMPP, it tells me the following:
Problem detected!
Port 80 in use by "Unable to open process" (PID 4)!
Apache will NOT start without the configured ports free!
Try to do this:
Run -> CMD, type services.msc and stop the program:
Web Deployment Agent Service
Afterwards try restarting XAMPP and say if it works or not!
I fixed it via reinstalling into another directory.

WAMP won't recognise its own Apache service (even though Apache is working)

I've been happily using WAMP for years without problems. Now, the icon is orange. When I click on the Apache service menu, then "start/resume", "restart" and "stop" are greyed out, as if the service isn't installed.
But here's the thing: the wampapache64 service is installed, and actually works. I can install it and remove it using WAMP, I just can't start or restart it from there, nor see a green icon.
I'm aware of dozens of "my WAMP icon is orange" posts here. These come closest to describing my problem (I'm getting a Service Unavailable on wamp, but everything is running, WAMP server stays yellow, though server is functioning normally?) but even those don't address this specific issue.
(The problem started when I clicked on the Apache version number in the WAMP menu, which I believe refreshes some config files.)
I'm using WAMP 2.5 64-bit, Windows 10. Apache is 2.4.9
I was dealing with the same issue with Wamp on Win 10 caused by one of the processes coliding with apache on port 80. All resolved by following steps:
open command line under as an administrator
make sure it is process with PID 4 listening to port 80:
netstat -o -n -a | findstr 0.0:80
change http process to use another port (i.e. 8000):
netsh http add iplisten ipaddress=0.0.0.0:8000
restart http service
net stop http
net start http
restart Xamp processes

Apache won't run in xampp

I have just installed XAMPP and everything works fine except that I can't get apache to run. It seems that port 80 is the problem, I have disabled Skype to use port 80 but it doesn't seem to fix it. I read somewhere that the SSL port can be the problem and should be changed. But I cant figure out were the port is or how to change it.
"Check the "/xampp/apache/logs/error.log" file"
I have tried to check this file but inside "logs" there isn't anything. From apache I can go to error but there is not any recently changed documents.
The error:
20:34:24 [Apache] Problem detected!
20:34:24 [Apache] Port 80 in use by "system"!
20:34:24 [Apache] Apache WILL NOT start without the configured ports free!
20:34:24 [Apache] You need to uninstall/disable/reconfigure the blocking application
20:34:24 [Apache] or reconfigure Apache to listen on a different port
20:40:50 [Apache] Attempting to start Apache app...
20:40:50 [Apache] Status change detected: running
20:40:51 [Apache] Status change detected: stopped
20:40:51 [Apache] Error: Apache shutdown unexpectedly.
20:40:51 [Apache] This may be due to a blocked port, missing dependencies,
20:40:51 [Apache] improper privileges, a crash, or a shutdown by another method.
20:40:51 [Apache] Check the "/xampp/apache/logs/error.log" file
20:40:51 [Apache] and the Windows Event Viewer for more clues
How to I fix these errors?
If you just want to make Apache run an don't mind which port it is running on, do the following:
In the XAMPP Control Panel, click on the Apache - 'Config' button which is located next to the 'Logs' button.
Select 'Apache (httpd.conf)' from the drop down. (notepad should open)
Do Ctrl + F to find '80'. Click 'find next' three times and change line Listen 80 to Listen 8080
Click 'find next' again a couple times until you see line ServerName localhost:80 change this to ServerName localhost:8080
Do Ctrl + S to save and then exit notepad.
Start up Apache again in the XAMPP Control Panel, Apache should successfully run.
Use http://localhost:8080/ in your browser address bar to check everything is working.
EDIT
Also you may have problems running XAMPP while running IIS. If you are running IIS it might be worth stopping the service then starting XAMPP.
Find out which other service uses port 80.
I have heard skype uses port 80. Check it there isn't another server or database running in the background on port 80.
Two good alternatives to xampp are wamp and easyphp. Out of that, wamp is the most user friendly and it also has a built in tool for checking if port 80 is in use and which service is currently using it.
Or disable iis. It has been known to use port 80 by default.
There are 2 ways to solving this problem.
If you want to run Apache in another port then:Replace in xampp/apache/conf/httpd.conf "ServerName localhost:80" by "ServerName localhost:81" At line 184. After that even it may not work.Then replace
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
by
#Listen 0.0.0.0:81
#Listen [::]:81
Listen 81
at line 45
If you want to use port 80. Then follow this. In Windows 8 “World Wide Publishing Service is using this port and stopping this service will free the port 80 and you can connect Apache using this port. To stop the service go to the “Task manager –> Services tab”, right click the “World Wide Publishing Service” and stop. If you don't find there then Then go to "Run > services.msc" and again find there and right click the “World Wide Publishing Service” and stop.
If you didn't find “World Wide Publishing Service” there then go to "Run>>resmon.exe>> Network Tab>>Listening Ports" and see which process is using port 80
And from "Overview>>CPU" just Right click on that process and click "End Process Tree". If that process is system that might be a critical issue.
Skype, try closing it and then running xampp, if it works then change the skype port to stop using port 80
Take a look at this site:
http://www.lukebrowning.com/blog/nt-kernel-system-using-port-80/
In my case, it was the SQL Server Reporting Service, but others have seen IIS or the Web Deployment Agent Service.
Open a cmd window and run services.msc, find the service, and stop it. Then try to start Apache. If it works, disable the other service.
Note that this problem usually occure for two reasons:
1-Port 80 is busy.
2-Port 443 is busy.
For number one as the others said, you can kill Skype and SQL Serever Reporter from
Windows Task Manager>"Services" Tab>"Services..." Button.
But if it dosen't worked, it's probably because of port 443, so try this one:
If you use VMware, go to
Windows Task Manager>"Services" Tab>"Services..." Button, and find "VMware Workstation Server" service, double click on it and press "Stop" button.
There is no need to stop other VMware's services.
Then again try to run Apache
logout your account in skype.. then in xampp control panel click start from the line of Apache..
In my case, it was something else. One day earlier I tried to install wordpress using bitnam of xampp, but I was not successfull.
When I saw the error log, there was an error :
httpd.exe: Syntax error on line 560 of C:/xampp/apache/conf/httpd.conf: Could not open configuration file C:/xampp/apps/wordpress/conf/httpd-prefix.conf: The system cannot find the path specified.
I opened the httpd.conf and found this line:
Include "C:/xampp/apps/wordpress/conf/httpd-prefix.conf"
I just commented it with #,
Now it's running fine. :)
In my case the problem was that the logs folder did not exist resp. the error.log file in this folder.
Like Ianshark points out, a common reason for this error in Windows 7 is the Web Deployment Agent service.
The Web Deploy Tool enables administrators to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.
You can disable it from XAMPP Control Panel by clicking the "Services" button. If you have changed the port in the Apache config file, change it back to 80. Then uninstall Microsoft Web Deploy, if you prefer a more permanent solution.
Do you have Bitnami installed? If so it is most likely one of those installations check by opening command prompt as admin or terminal in linux, enter this...
netstat -b
This will give an application name to those processes and ports in use. Look for :80 or :443
I had the same kind of problems. I finally made it to work.
I successfully changed the apache ports to listen to ports not used by other programs
Port 443 is used by SSL and Skype
I believe that the XAMPP Control Panel has a bug and I have screen shots in my posts to. I do not have enough credibility on this web site to upload pictures.
I have the whole thing written down with screen shots in the following blog posts:
http://hodentek.blogspot.com/2014/02/one-way-to-handle-port-80-in-use-by.html
http://hodentekhelp.blogspot.com/2014/02/on-installing-apache-on-windows-7-64bit.html
http://hodentekhelp.blogspot.com/2014/02/do-you-want-to-change-ports-that-skype.html
None of the above worked for me. This is what finally worked for me:
1) Start Services (Type services in your start > search)
2) Look for Apache services.It was disabled in my case. Enabling it worked for me.
Some people have also reported duplicate listing of Apache services which has prevented it from starting. If that is the case, delete/disable one of the Apache services which corresponds to the wrong path.
A restart of XAMPP might be required.
In my case I simply had to run the control panel as administrator
just disable "world wide web publishing service" , it solve my problem.
In my case, it was something else. One day earlier I tried to install Magento using bitnami of xampp. And I deleted That Module
I opened the httpd.conf and found this line:
Include "C:/xampp/apps/magento/conf/httpd-prefix.conf"
I just commented it with #,
Now it's running fine. :)
Try stopping Apache and MySql and starting them again in the following order.
Apache
MySql
Etc...
Wait for both services to stop properly before restarting. Turning them on and off too quickly gives the same problem.
Inspired by lansharks answer.

XAMPP on Windows - Apache not starting

I have installed XAMPP on my windows 7 machine but can't get Apache to work.
On start I get the following errors:
13:09:21 [apache] Apache Service Detected With Wrong Path
13:09:21 [apache] Uninstall the service manually first
13:09:21 [apache] Possible problem detected!
13:09:21 [apache] Port 80 in use by "system"!
13:09:21 [tomcat] Tomcat Service Detected With Wrong Path
13:09:21 [tomcat] Uninstall the service manually first
After opening the XAMPP panel and installing Apache service: I have tried start it, it always get stuck "Starting apache service..."
Any advice on how I could resolve this ?
Thanks
Jamil
I was able to fix this!
Had the same problems as stated above, made sure nothing was using port 80 and still not working and getting the message that Apache and Mysql were detected with the wrong path.
I did install XAMPP once before, uninstalled and reinstalled. I even manually uninstalled but still had issues.
The fix. Make sure you backup your system first!
Start Services via Control Panel>Admin Tools (also with Ctrl+R and services.msc)
Look for Apache and MySQL services. Look at the patch indicated in the description (right click on service then click on properties). Chances are that you have Apache listed twice, one from your correct install and one from a previous install. Even if you only see one, look at the path, chances are it's from a previous install and causing your install not to work. In either case, you need to delete those incorrect services.
a. Got to command prompt (run as administrator): Start > all programs > Accessories > right click on Command Prompt > Select 'run as administrator'
b. on command prompt type sc delete service, where service is the service you're wanting to delete, such as apache2.1 (or sc delete Apache2.4). It should be exactly as it appears in your services. If the service has spaces such as Apache 2.1 then enter it in quotes, i.e. sc delete "Apache 2.1"
c. press enter. Now refresh or close/open your services window and you'll see it`s gone.
DO THIS for all services that XAMPP finds as running with an incorrect path.
Once you do this, go ahead and restart the XAMPP control panel (as administrator) and voila! all works. No conflicts
my friend this the will fix ur problem ;)
in root of folder ( xampp ) just run this file ( setup_xampp.bat ) then press enter
and try to start the apache server
every things will work like charm ;)
The most likely reason would be that something else is using port 80. (Often this can be Skype, IIS, etc.)
This tutorials shows How to Change the Apache Port in XAMPP
I spent over 3 hours to find out solution. Actually port 80 was being used by "system" service so I tried to change port from 80 to 8080 in "httpd" file but same problem raised "port 80 is used by system". It had driven me mad for 3 hours as every thing was changed like port , localhost server etc pointing to 8080.
At last I found mistake that was server root. Basically "Server Root" in "httpd" should be pointing to apache foler of xampp. In my case that's was
ServerRoot "xampp/apache"
I just changed it as follows:
ServerRoot "C:/xampp/apache"
It has worked successfully and now everything is running with OK status.
refer this:- http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
and to enable telnet http://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx
I encountered the same issue after XAMPP v3.2.1 installation. I do not have Skype as most people would believe, however as a Software Developer I assumed port 80 is already in use by my other apps. So I changed it by simply using the XAMPP Control Panel:
Click on the 'Config' button corresponding to the APACHE service and choose the first option 'Apache (httpd.conf)'. In the document that opens (using any text editor - except MS Word!), locate the text:
Listen 12.34.56.78:80
Listen 80
And change this to:
Listen 12.34.56.78:83
Listen 83
This can be any non-used port number.
Thanks.
I know this is somewhat of an old topic, but in case anyone reads this in the future...
I uninstalled xampp, deleted everything under the c:\xampp folder, then reinstalled xampp as administrator and it worked like a charm.
For me, the problem was I had two installations of Apache Tomcat
The following steps solved my problem:
Open up services.msc in command prompt
Select the Apache Tomcat service, right click and select properties
Check the path to the executable of the service
Follow the instructions in
https://stackoverflow.com/questions/7190480/modifying-the-path-to-executable-of-a-windows-service
to change the path to "\tomcat\bin\tomcat7.exe" //RS//Tomcat7
Restart XAMPP Control Panel
I had my Apache service not start same as MySQL one.
Please follow these steps if none of above tips works :
Open regedit.exe on any windows this available . Run as administrator. (Only on windows 7 and later editions )
Go to local machine/system/controlset001/services
Find and delete folders of services apache and mysql .
Uninstall xampp . Delete folder of xampp.
Restart computer and reinstall Xampp . After that your Xampp apache and Mysql should work.
Note: Ports 80 and 443 must be unused by any program.
If it is in use . Just edit ports. There is a lot of tutorials about that .

Unable to start Apache in XAMPP

I have downloaded xampp-win32-1.7.7-usb-lite.7z and unzip it to C drive in my VirtualBox. Then i tried to start Apache through xampp-control.exe. when i press Start button in-front of Apache label, apache started port 80 display in text area in that window. but nothing happen. Start button not change to stop. but mysql is start properly. how could i start Apache ?
Try ZendServer CE, it works great in a Virtual Box. Apache gives problem inside a Virtual Box.
You can also refer this post: Apache won't start in VirtualBox
Try to Restart Xampp from the option Explore
Xampp Contorl-> Explore-> Xampp-Restart
If you have other service installed like .NET SQL Server it may block xampp
Xampp Contorl-> SCM -> SQL server-> Manual from Automatic
Xampp Control-> SCM-> Web client->Disabled
If you like to run service always Check SVC for both Apache Mysql It will ask you to install service click YES to install
Finally Restart your machine
i don't know whether your issue is resolved or not,if not please try the below mentioned cases
1.if your Skype account is logged in,please log out from that(usuall skype uses default Ports numbers 80 and 443 )
2.check whether any other application is running on the port 80,if so please change that port number to other.to see that from a command prompt, run netstat -a. This will output a list of ports that are currently running.
(how to change the default port number is open your httpd.conf file and search for localhost you will find 80 there and change that to your desired number)
i think these are the main cases so please go through this cases also..