How to solve the problem that phpstudy80 port cannot be used

下次还敢
Release: 2024-04-02 14:45:16
Original
377 people have browsed it

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:
<code>netstat -aon | findstr :80</code>
Copy after login
  • 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:
<code>taskkill /pid <PID> /f</code>
Copy after login
  • Where <PID> 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:
<code>netstat -aon | findstr :8080</code>
Copy after login
  • 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:
<code>http://localhost:8080</code>
Copy after login
  • 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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!