Windows under PHP installation path configuration error causes Apache to fail to start the solution

  • 2020-05-10 23:19:05
  • OfStack

LoadModule php5_module "C (/ D) : / Program Files/php5 / php5apache2_2 dll"   PHP apache cannot startup errors caused by the installation path

Today, when installing and deploying web service to my colleague's PC machine, I put all the program files under program files in the installation directory as required by my colleague, so I installed apache under c:\program files, and php under c:\program files. After installing MySql and configuring the configuration files of apache and php, the problem was found that Apache could not be started normally.

For this reason, I uninstalled and reinstalled the apache+php+mysql environment once more, but the problem did not end with the reload - the error remained the same. Depressed ah depressed, think of the previous installed in other positions are normal, why did not install here?

Therefore, I created a new directory under D disk, deleted all the three systems installed in front of me, and installed them again under D disk. Ann normal configuration is finished, restart, this time the normal start.

I was even more depressed when I saw the green arrow on the red feather of apache. Why can't I line up on D? Why can't I line up on C?

Confused 1 will, then calm down to analyze and guess 1 will, estimated that the problem should be caused by apache modular loading and running php code:


LoadModule php5_module C:/programe files/php/php5apache2.dll PHPIniDir "C:/programe files/php"

Summary: Apache will execute the following Spaces as arguments, so C or D:/programe files... Such a path is obviously unpassable under apache.

The above past events in Windows environment after more than 20 minutes of toss can be considered as personal experience, here to share with you, so as to avoid you and I make the same mistake again


Related articles: