IIS 7 and Above
IIS 7.5 and PHP
Last post Jan 18, 2018 08:53 AM by Yuk Ding
Jan 11, 2018 12:42 PM|JuanMdP|LINK
I'm not sure if this is the right forum, far as I know this isn't related to fastCGI. We recently had to migrate a big app from a regular PC that hosted it to an actual server (Windows Server 2008 R2 with IIS 7.5, PHP was installed using the WebPI) however
in the span of the three weeks that's been running I've noticed a couple of odd issues. Some were related to fastCGI but the latest one has me at a loss~.
In php you define constants so you can use them thorough your project, we are using them to isolate the table names in databases in case of changes in the future; somehow, for some reason, even though the files with the definitions were still being included,
out of nowhere it ceased to acknowledge the value for all defined constants. Restarting IIS "fixed it" but that's not really a fix to a problem I ignore the cause for. So if anyone has any idea what could be going on any kind of insight
into the issue would be greatly appreciated~.
Jan 11, 2018 10:46 PM|JuanMdP|LINK
Further looking into the issue, since it happened again but this time not picking up some other included files, it seems recycling the application pool did the trick. However, given that it's a server with enough resources it seems ridiculous the app would've
depleted the resources in less than 10 hours. Initially the issue was the usual "fastCGI exited unexpectedly" and following some advices on how to configure IIS for PHP is how I wound up with this new issue~.
So I guess the question becomes, what'd an optimal way of setting IIS + PHP + fastCGI in order to avoid having any more of these issues. Clearly the basic stuff I did, the same I had on the old PC, is no longer cutting it with this new server~.
Jan 12, 2018 02:01 AM|lextm|LINK
Check the architecture, and decide where the problem might be,
Otherwise, you probably waste your time on the wrong side.
Jan 12, 2018 06:11 AM|Yuk Ding|LINK
Does it works fine in your develop environment. We need to figure out it occur in IIS side or application side. If it is caused by PHP configuration or code issue. You could consult the PHP related forum.
However, if it could works in the develop environment or other server. Then you could check the steps to host PHP with IIS following this link:
In addition, please ensure you have granted the permission for your authenticated user to access all the file that require to be read.
If your application require load 32-bit, you could enable it in application pool advanced setting.
Jan 12, 2018 12:48 PM|JuanMdP|LINK
Hey Yuk Ding,
Thanks for your reply. It's only happening in production, in my dev environment which is running the same version of PHP and IIS it's just fine. But then again, my dev environment doesn't have any number of concurrent users. The change to this resource depletion
only happened after changing settings on the appPool to No Managed Code for the
.Net framework version and Classic on Managed pipeline mode. I only changed those settings in order to try and fix the issue with "fastCGI exited unexpectedly"; I scheduled the recycling on the appPool
to do it once every 2 hours and that's helped so far but I can't help but think it's not the actual solution since I have yet to figure out why the server runs out of resources in the first place~.
This very same app used to run on a regular PC (W7 + 4 GBs of RAM) and it never experienced either of the issues I mentioned which makes this all the more baffling for me~.
Jan 18, 2018 08:53 AM|Yuk Ding|LINK
Could you find any error code just like this?
The error code may pinpoint the solution.