Solution to phpstudy port 80 being occupied by system under Win7 system
The reason for my occupation isSQL Server Reporting Services
, stop this service and set it to start manually. If you have not installed SQL Server, please refer to the solution below.
Start phpstudy to configure the virtual machine environment locally. Start apache or nginx and find that the port is occupied and cannot be closed.
Open cmd and runnetstat -aon|findstr "80"
, then runtasklist /fi "PID eq 4"
,
At first glance, it seemed that it was still the System process?
I couldn’t end it, so I started to slowly check what was occupied. Port 80 was occupied. System is occupied, it must be caused by the HTTP service. Enter the command netsh http show servicestate
Request queue: Process ID: 4212
Open task manager: control shift esc
Above in cmd, we get PID = 4212, now let’s see what it is Making trouble
#When I saw the result in the picture above, I suddenly realized it! If you are not sure what process it is, let's right-click on it - open the file location. Now everyone should understand it. What I occupy is basically the reporting service of SQL Server
Finally we openservice.msc
FindSQL Server Reporting Services
Right-click, click Properties,
Stop changing the service and change Change the startup type to manual. (The service has been stopped in the picture)
How to check the current occupancy of port 80:
netstat -ano | findstr 0.0.0.0:80
Enter this command and press Enter. If there is no content in the middle, it means it is not occupied. At this time, starting phpstudy apache will not prompt that the port is occupied!
Related recommendations: "phpstudy v8 keeps "showing that the port is occupied and is trying to close" solution》
The above is the detailed content of Solution to the problem that phpstudy port 80 is occupied by system under Win7 system. For more information, please follow other related articles on the PHP Chinese website!