1

I am starting apache at port 80 with xampp. However, the port 80 is taken by PID of 4 by the name system. I have tried Taskkill /F /PID 4 to force kill the task by even using the administor's rights but access is still denied. Any idea on how to solve this problem (I don't want to change the port of apache)

Chit Khine
  • 830
  • 1
  • 13
  • 34
  • When I have used systeminternals tcp monitor and it indicates a system process owns a port its typcially because windows firewall was on, and had intercepted some other process. Of course, the firewall wouldn't be holding the listen port open except for some other app that had opened it. You don't have IIS enabled? Just a guess. – Chris Becke May 11 '16 at 05:23
  • Maybe this will help: http://stackoverflow.com/questions/1430141/port-80-is-being-used-by-system-pid-4-what-is-that – azalea Nov 29 '16 at 16:09
  • I have exactly the same problem on an Asus laptop but when running ampps, and the solution for me is to stop the 'ASUS Flip Service' which listens on port 80. However I have to do this each time in the MS Services gui tool, I don't yet have a solution for both the flip screen and ampps to run together. – Nick W Jan 03 '18 at 18:02

6 Answers6

9

the port 80 is usually being used by this service: "World Wide Web Publishing Service", open "Services" in the Control Panel and stop it

Gonza Piotti
  • 707
  • 10
  • 10
2

Nick W I had the same issue with my Asus Laptop,

In windows you can get information about the ports that are being used by some aplicacions with this commands: netstat -ao netsh http show urlacl

The Service Asus Flip Service by default uses port 80, is you stop the service it will release the port, but if you turn your laptop into the tablet mode the screen won't rotate

So if you want to use Asus Flip Service and release port 80 you could change the Web Service Port that is being used, I changed the port to 800

What I did is to go to the directory where the app is installed and change the config files

Director: C:\Program Files\ASUS\ASUS FlipLock

The config files that I changed are:

FlipController.exe.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IWifiPowerServer" />
                <binding name="BasicHttpBinding_IFlipPTPServer" />
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:800/FilpWifiPowerManager.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWifiPowerServer"
                contract="WifiPowerServer.IWifiPowerServer" name="BasicHttpBinding_IWifiPowerServer" />
            <endpoint address="http://localhost:3712/FlipPTPServerManager.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IFlipPTPServer"
                contract="FlipPTPServer.IFlipPTPServer" name="BasicHttpBinding_IFlipPTPServer" />
        </client>
    </system.serviceModel>
</configuration>

ReStoreWifiPower.exe.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IWifiPowerServer" />
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:800/FilpWifiPowerManager.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWifiPowerServer"
                contract="WifiPowerServer.IWifiPowerServer" name="BasicHttpBinding_IWifiPowerServer" />
        </client>
    </system.serviceModel>
</configuration>

WifiPowerManager.exe.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
  <system.serviceModel>
    <services>
      <service name="WifiPowerManager.WifiPowerServer"
               behaviorConfiguration="HostedNetworkControlHostBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:800/FilpWifiPowerManager.svc"/>
          </baseAddresses>
        </host>
        <!-- this endpoint is exposed at the base address provided by host: http://localhost/FilpWifiPowerManager.svc  -->
        <!--endpoint address=""
                  binding="wsHttpBinding"
                  contract="HostedNetwrokController.IHostedNetworkOperation" /-->
        <endpoint  binding="basicHttpBinding"
                   contract="WifiPowerManager.IWifiPowerServer" >
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <!-- the mex endpoint is explosed at http://localhost/HostedNetworkController/service/mex -->
        <endpoint address="mex"
                  binding="mexHttpBinding"
                  contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="HostedNetworkControlHostBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="False"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
YAiR
  • 21
  • 1
1

try run cmd: net stop http that will stop some services, then you can check what service use port 80

0

When I ran into the same problem of yours, I changed the apache port to 81 which is 80 by default, and it worked and I have been using since. here is how to do that. start xampp Control Panel-> click on the config button against apache -> click on httpd.conf -> look for port number and change it to a desired port -> restart xampp ->done.

Simo
  • 345
  • 4
  • 12
0

Process PID 4 is System-critical service, you cannot stop it without causing windows to stop completely.

Any of these approaches should probably fix the issue:

  • Change http.sys settings in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\UrlAclInfo Just change http:+:80 to another port number in all keys necessary then restart your computer.

  • Find what program is using that port and use its configuration to change the port. Usually Microsoft SQL Reporting Tool uses http.sys to listen on port 80, there is a configuration manager that allows you to change that.

  • Use a different port in your Apache application.

Felype
  • 3,087
  • 2
  • 25
  • 36
-1

First Do this:

  • In the Windows Task Manager window, go to the Processes tab.
  • In the menu, click View -> Select Columns.
  • In the Select Process Page Columns, select the PID (Process Identifier) checkbox.
  • Click OK.
  • CHECK the checkbox of Show Process from all users
  • In the Processes tab, find the process of the said PID in the corresponding column.

Next:

Stop the process corresponding to the PID and start XAMPP

My Guess: Either IIS or WAMP or SQL Server Reporting Services (MSSQLSERVER) or WebMatrix's "Web Deployment Agent Service" is using your port 80

Koustav Ray
  • 1,112
  • 13
  • 26
  • the process name is ntoskrnl.exe – Chit Khine May 11 '16 at 09:37
  • It seems like it is the main operating system process. I will just try to change the port to the other port. Thanks for the help. – Chit Khine May 11 '16 at 09:39
  • Maybe these answers can help: http://stackoverflow.com/questions/1430141/port-80-is-being-used-by-system-pid-4-what-is-that – Koustav Ray May 11 '16 at 14:22
  • Also..Any version of IIS, Visual Studio, or web development tools installed, or IIS enabled under Windows features? That can have results similar to what you have found. – Koustav Ray May 11 '16 at 14:23