Home >Backend Development >PHP Tutorial >Reason why PHPStrom reported a 502 error when uploading files, _PHP Tutorial
PhpStorm is a lightweight and convenient PHP IDE. It has an Apache-like compiler and can work without Apache. It can be run under PHPstrom, which is very suitable for friends who are new to PHPstrom.
But I discovered a problem, that is, when using PHPStrom for uploading, it will cause PHPStrom's own compiler to crash. When I first encountered this problem, I always thought it was an environmental problem, so I reinstalled the system. . Later, after repeated troubleshooting tests, it was found that environmental problems were not the cause.
Then how to solve this problem is to use the Apache compiler instead of the PHPstrom IDE compiler.
For example, the port number of PHPstrom is 63342, and the port number of Apache is 8080. Can you change the port number to the port number of Apache? Can this solve the problem?
No, it’s not possible yet, because Apache has a designated access path. There are two solutions. One is to move the file to the default path, or change the default path to the current file.
Modify the DocumentRoot C:/apache/htdocs in the path httpd.conf to the path of your current file, and that’s it.
Note: Let me say it again, because the program you start directly in phpstrom will use its own compiler. You can carefully check whether the port number of the browser has changed to 63342. Friends who have installed apache know that the port number of apache is definitely not this. So obviously, you are not accessing apache, so what should you do now? The first step is to install your development program in the apache running directory, which is the /apache/htdocs directory. The second step is to re-run the program and change the browser localhost: 63342 to your own apache port number. Then run it again. It should be able to run, and it's not a bad mistake to catch this error.