errors attempting to start Apache through XAMPP - apache

This is what shows up when I attempt to run Apache without Apache service being activated:
>Status change detected: running
>Status change detected: stopped
>Error: Apache shutdown unexpectedly.
>This may be due to a blocked port, missing dependencies,
>improper privileges, a crash, or a shutdown by another method.
>Check the "/xampp/apache/logs/error.log" file
>and the Windows Event Viewer for more clues
This is what happens when I attempt to install the Apache service:
>Installing service...
>Apache Service detected with wrong path
>Change XAMPP Apache settings or
>Uninstall/disable the other service manually first
>Found Path: ERROR: Not Able To Open Service Manager
>Expected Path: "c:\xampp\apache\bin\httpd.exe" -k run service
>Successful!
...followed by attempting to start Apache after the service (failed) attempt:
>Attempting to start Apache service...
>System Error. Code: 5.
>Access is denied
Does anyone know what's going on here and/or are able to help troubleshoot?
I've already uninstalled and reinstalled with and without (zip file extraction) the installer.

It sounds like something may be running on port 80 already. What happens when you run
netstat -an |find /i "listening"
from the command line?

I had those messages as well. You probably have IIS and XAMPP clashing at port 80. You can either:
disable IIS (if you are not going to run the server regularly).
change XAMPP default ports.
change IIS default ports.
To change XAMPP default ports
Open your XAMPP\apache\conf\httpd.conf file and change the "80" ports to something else, people like "8080".
Open your XAMPP\apache\conf\extra\httpd-ssl.conf file and change the "443" ports to another number.
It should make both services run without conflicts.

Related

Cannot bind to port 8080. It is probably taken by another application or you don't have enough privileges

I deleted my XAMPP from the applications folder(without uninstalling) and installed it again then I tried to change my apache port 8080 after that this problem showed up 'Cannot bind to port 8080. It is probably taken by another application or you don't have enough privileges'
I tried to fix it by uninstalling and installing again it didn't work then I deleted cache files of XAMMP with some sudo code but it didn't work anyway
in windows to check what ports applications are running on, open command prompt as admin and type "netstat -a -b"
stop whatever application is running on port 8080

Apache shutdown unexpectedly wont starting

I have this error above
Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
I change httpd.conf Listen 80 to 8080 port and server name also SSL port on httpd-ssl.conf and not working
Due to many reason this error occurs ,
1) Port block (80,433)
2) php version (x86) , apache(x64) version mismatch vice versa
3) Point correct php version in the system environmental variable
To get detailed error try to run
apache_start.bat
mysql_staer.bat
In my case am facing problem with XAMPP control panel V3.2.4 portable version
It says "apache server root should be valid"
setup_xampp.bat after running this bat file everything solved by itself

Apache won't start on xampp: "Apache Service detected with wrong path"

3:49:14 PM [Apache] Apache Service detected with wrong path
3:49:14 PM [Apache] Change XAMPP Apache and Control Panel settings or
3:49:14 PM [Apache] Uninstall/disable the other service manually first
3:49:14 PM [Apache] Found Path: "C:\xampp\apache\bin\httpd.exe" -k runservice
3:49:14 PM [Apache] Expected Path: "c:\program
files\orangehrm\4.0\apache\bin\httpd.exe" -k runservice
This happens when you have installed another service running like apache by itself (without any bundle), or WAMP or another bundle that has apache server.
You have to check in your programs if you have 2 different apache installed on your pc and then proceed to uninstall 1 of them. I would uninstall both then install again the one I want to keep (Xampp for example). It's a good practice after you delete/uninstall a program to use tools like Ccleaner to clean the registry of your pc that way you ensure the program is "completely" uninstalled of your pc.
If you have to keep more than one apache instance. Both of then are pointing to the same direction and port by default. You have to change the port that way you can enter to localhost (localhost:8080 by default) and localhost:8083 (another port used to run other apache instance) and so on as many instances of apache you have.
You can read more here:
1) Apache default ip port
2) apache tcp/ip port
3) 2 apache instances on your pc

Could not Start Service -"contact the service vendor, and refer to service-specific error code 1"

I have created a service and the service installed succesfully in the system and I could see it in the services.msc as well. Now when I try to start the service it gives me an error that "Windows cannot start service "X" in Local computer...contact the service vendor, and refer to service-specific error code 1."
Now my service "X" was installed using a .bat file and to start the service it refers to a .exe file of type Commons Deamon Service Runner. This file is similar type of file which is also used internally to Apache service during Tomcat start up.
Now I have searched for the root cause and found that it could be due to clash in port 80 due to which my service is not starting. Does any one have any idea how to modify my service port from 80 to anything else.
Thank you for your help!
Any info on Error code 1 would also be helpful!
Some other program like Skype must be listening on port 80;
To resolve the error, close those programs and try starting the server again.
Now to change the default port for Apache - Modify the line "Listen 80" to "Listen 8080" (make sure you use port greater than 1023) in httpd.conf file

Succeeded installing but could not start apache 2.4 on my windows 7 system

I am attempting to install and run apache 2.4 on my windows 7 system
I went to the apache 2.4 bin directory and ran the following:
Note: I opened the cmd window as administrator.
C:\Apache24\bin>httpd.exe -k install
Its output was as follows:
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
So it installed apache 2.4 as a service but it could not be started. It seems like the localhost port 80 is being used. Is this what "[::]:80" means?
I then stopped both the the apache 2.0 service which I had left running and the mysql service, hoping stopping one of them might free up localhost port 80.
I also run netstat -o to see if port 80 is being used. It was not.
But, I then found that a process was using the above socket it is a process that is listening on the above socket
TCP [::]:80 User-PC:0 LISTENING 4
I then ran tasklist and found out that System is using pid 4. 4 is under the pid column
System 4 Services 0 544 K
Finally, from the failed attempt to start the service
I got an error which was recorded in windows systems events.
Log Name: System
Source: Service Control Manager
Date: 2/21/2013 1:58:03 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: User-PC
Description:
The Apache2.4 service terminated with service-specific error Incorrect function.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-02-21T18:58:03.723988900Z" />
<EventRecordID>87756</EventRecordID>
<Correlation />
<Execution ProcessID="560" ThreadID="7596" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">Apache2.4</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>
The error from the attempt to start says that beacause of lack of access, make-sock could not bind to sockets which to me looked like localhost port 80. For example,
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
Can anyone tell what I am doing wrong?
Sorry for the belabored question. To solve my problem I just told apache 2.4 to listen to a different port in httpd.conf. Since System was using pid 4 which was listening on port 80, I did not want to explore this any further.
I put the following into httpd.conf.
Listen 127.0.0.1:122
The most likely culprit is Microsoft Internet Information Server. You can stop the service from the command line on Windows 7/Vista:
net stop was /y
or XP:
net stop iisadmin /y
read this
http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
I have the same problem too, after upgrading win7 to win10.
then I check services.msc and found "World Wide Web Publishing Service" was running automatically by default.
So then I disabled it, and running the Apache service again.
Port 80 maybe used by Microsoft HTTPAPI
Try to stop the following service:
Web Deployment Agent Service
SQL Server Reporting Service
SQL Server VSS Writer
I solved this issue finally, it was because of some systems like skype and system processes take that port 80, you can make check using netstat -ao for port 80
Kindly find the following steps
After installing your Apache HTTP go to the bin folder using cmd
Install it as a service using httpd.exe -k install even when you see the error never mind
Now make sure the service is installed (even if not started) according to your os
Restart the system, then you will find the Apache service will be the first one to take the 80 port,
Congratulations the issue is solved.
In my case, it was due to an IP address that Apache is listening to. Previously I have set it to 192.168.10.6 and recently Apache service is not running. I noticed that due to My laptop wifi changed recently and new IP is different. After fixing the wifi IP to laptop previous IP, Apache service is running again without any error.
Also if you don't want to change wifi IP then remove/comment that hardcode IP in httpd.conf file to resolve conflict.
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
So, that is why i do a two (or more) post.
I was having the same problem when starting the service (logs can not be opened).
I thought it was because i was trying to have htdocs inside a VeraCrypt encripted container, absurd since i hace such contained mounted and i use a juntion to not affect paths.
The i read the cause could be low ram: after some tests i get to the next conclusion.
Windows is not sending pages to virtual ram to free enough ram if it is a service, for applications it is doing it, i have more than 200GiB of pagefile ready to be used as virtual ram in a 4GiB 64 Bit windows 10.
My solution:
Run a free utility that free ram (512MiB in my test)
Inmediatly after start the service, it starts with no errors
Real Cause:
I was using a virtual machine that uses 1/2 physical free ram (1.5GiB)
Hope this help others.
I was also facing the same issue, then i tried restarting my system after every change and it worked for me:
Uninstall Apache2.4 in cmd prompt (run administrator) with the command:
httpd -k uninstall.
Restart the system.
open cmd prompt (run administrator) with the command:
httpd -k install.
Then httpd -k install.
Hope you find useful.
you can solve it
sudo nano /etc/apache2/ports.conf
and changed Listen to 8080
This may be because of shortage in physical RAM.
Check minimum system requirements in the docs and try to close unnecessary programs if possible.