phpstudy cannot start apache
Failed to start phpStudy
One is firewall interception
The other is port 80 has been occupied by other programs, such as IIS, Thunder, etc.
The third is VC9 is not installed The runtime library, php and apache are all compiled with VC9. These three issues are addressed in turn.
##1. Change the firewall
Open the Control Panel——>System and Security——>Windows Firewall——>Allowed application, and then add phpStudy to the allowed applications;2. Port 80 is occupied
First you need to know what is occupied, and then solve the problem:Open the Windows key R to open running cmd, open a black window and enter netstat -ano to get the picture:## Find the 80 port as shown in the picture 0.0.0.0:80, as you can see Port 80 is occupied by process No. 4. Note down the PID number of the process running under port 80, as shown in Figure 4. Then enter tasklist | findstr "4" to find out that the process with PID 4 is the system process. Then unblock the system process. The solution for Windows 8.1 is similar to that for Windows 7. For other processes that are not system processes, you can directly open the Task Manager -> Service and end the process with the corresponding PID.
Later, because it was found that Xunlei and SQL server would also occupy port 80, Xunlei was closed. At that time, I considered using MYSQL and did not use SQL Server frequently. I also changed the SQL Server service log and registry, but the port was still not resolved. If there is a occupancy problem, just uninstall SQL Server directly.
3. Check the V9 runtime library.Open Control Panel\Programs\Programs and Features——>Uninstall and change programs to see, as shown in the figure:
There is no automatic Install.
After completing these steps, I thought it would be successful, but it has not been successful yet, as shown in the figure:
If it still doesn’t work, try to modify the configuration file. First open phpStudy——>Other options menu——>Site domain name settings. Set and save the configuration file according to your own situation. As shown in the picture:
# Then open the location of the apache file through phpStudy and enter the bin folder. Run cmd to enter the bin folder, as shown in the picture:
## Run httpd.exe The successful operation will look like this, as shown in the picture:
The failure to run successfully is:
The error message prompted is: AH00526: Syntax error on line 67 of D:/phpStudy/Apache/conf/vhosts.conf:
DocumentRoot must be a directory. Change the configuration file according to your own prompt information to determine whether the error is in the vhosts.conf or httpd.conf file. When I changed it, errors appeared in both files. I ran httpd.exe once to solve one. Continue to open the configuration file through phpStudy. Change the file path and save.httpd.conf:
vhosts.conf
Finally ran phpStudy and finally succeeded
Recommended tutorial: phpstudy usage tutorial
The above is the detailed content of phpstudy cannot start apache. For more information, please follow other related articles on the PHP Chinese website!