win2012 IIS8.5 installation PHP tutorial, some versions can not be used

Because I have been using the environment of win2003+IIS6.0+PHP, I think I am very familiar with building PHP, but recently when I was building the environment of win2012+IIS8.5+PHP, I encountered some problems. After 4 hours of tossing, Finally got it done, this article records some experience, maybe many friends will encounter the same problem as me.

Win2012 installs PHP, some versions cannot be used

At the beginning, the PHP version I used was PHP-5.2.4-Win32. Note that php.inithis file is not used at this time. But when I want to enable some extended functions, for example extension=php_curl.dll, I want to use them php.ini, and after copying the file C:\Windows, I run the PHP file and report an error: 500 internal server error. This let me know that the previous win2003+IIS6.0+PHP build method is not applicable to the win2012 system!

Is the PHP version too low? With this question in mind, I downloaded php-5.3.29-nts-Win32-VC9-x86 and reconfigured the PHP environment manually. When it was useless, the php.initest PHP program ran successfully. Then enable an extension function, use it php.ini, and copy the file to it C:\Windows, then run the PHP file again, no more errors! From this point of view, it is really a PHP version problem, you need to use a version above php5.3.

I also found that, unlike the win2003 configuration PHP environment, configure PHP in the win2012 system, if you use the curl extension (other extensions may also be the same), then modify, after the modification, restart php.iniIIS to take effect immediately, no need to php.inicopy the file to C:\WINDOWS\, and do not copy Files related to extensions such as libeay32.dlland ssleay32.dllto C:\WINDOWS\SysWOW64\.

Guess you like

Origin blog.csdn.net/mo3408/article/details/132194213