Home  >  Article  >  Operation and Maintenance  >  How to solve the problem that phpstudy80 port cannot be used

How to solve the problem that phpstudy80 port cannot be used

下次还敢
下次还敢Original
2024-04-02 14:45:16264browse

When port 80 of PHPStudy is occupied: Use the command to find the process ID of the program occupying the port. End the program occupying the port. Set a new port for PHPStudy. Restart Apache. Verify that port 8080 is available. Access the PHPStudy website via http://localhost:8080.

How to solve the problem that phpstudy80 port cannot be used

PHPStudy port 80 is occupied Solution

When PHPStudy cannot use port 80, it usually means that the port has been occupied occupied by other programs. The steps to solve this problem are as follows:

1. Find the program that is occupying the port

  • Open a command prompt or terminal and enter the following command:
netstat -aon | findstr :80
  • The output will show the process ID (PID) of the program that is using port 80.

2. End the occupied program

  • Use the following command to end the occupied program:
taskkill /pid  /f
  • Where is the process ID of the occupying program.

3. Configure a new port for PHPStudy

  • Open the PHPStudy control panel.
  • Go to the "Environment" tab.
  • In the "PHP" section, change the "Apache Port" to an unoccupied port (e.g. 8080).
  • Click "Save".

4. Restart Apache

  • In the PHPStudy control panel, click the Actions tab.
  • Select "Restart Apache".

5. Verify that the port is available

  • Use the following command to verify that the 8080 port is available:
netstat -aon | findstr :8080
  • If the output does not show any entries, it means that port 8080 is available for PHPStudy.

6. Visit the PHPStudy website

  • Enter the following URL in the browser:
http://localhost:8080
  • If the page loads successfully, it means that PHPStudy has successfully used port 8080.

The above is the detailed content of How to solve the problem that phpstudy80 port cannot be used. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn