The solution to the problem that PHP cannot be accessed from the external network when setting up the External access requests are forwarded to the local Web service; 3. Dial-up Internet access needs to be bound to a static IP or use dynamic DNS; 4. Check whether there are other programs on the machine listening to port 80. These programs need to be stopped or transferred to other ports. to avoid conflicts.
The operating system for this tutorial: Windows XP system, php8.1.3 version, Dell G3 computer.
After setting up a PHP environment on Windows XP, the inability to access the external network may be due to the following reasons:
1. Firewall:
The XP system has the firewall enabled by default, and port 80 needs to be opened. You can enter "Control Panel" -> "Windows Firewall" -> "Advanced Settings" and add inbound rules to allow access to the port.
2. Network settings:
You need to set up port forwarding in your own router or offline test server to forward external access requests to the local Web service.
3. Dynamic IP:
If you are using dial-up Internet access, it will often be Assign different dynamic IPs. If this happens, you need to bind a static IP or use dynamic DNS to solve it.
4. Port occupation:
You also need to check whether there are other programs on the machine listening to port 80. You need to stop these programs or transfer them to other ports. avoid confict.
In addition, PHP itself may also malfunction, resulting in inaccessibility, which may include syntax errors, code execution failures and other problems. The PHP error log and application log need to be checked to determine the specific cause of the problem so that it can be repaired and resolved.
The above is the detailed content of How to solve the problem that PHP cannot be accessed from the external network in XP system. For more information, please follow other related articles on the PHP Chinese website!