I have spent a great deal of time getting my PHP web site working with IIS and Sql Server 2005.
The last problem that I need to fix is that of IIS. If a Session expires or any error happens the web site goes down and the only way to get it back up again is to do a iis_reset on the IIS server. I see a HTTP Error 500 Internal Server Error.
I am not seeing any errors in the web site code but sessions do expire and I need to fix this.
These are the last few entries in the IIS log file:
15:15:04 127.0.0.1 GET /rut/category_list.php 200
15:15:16 127.0.0.1 GET /rut/phrase_view.php 200
15:15:23 127.0.0.1 GET /rut/category_list.php 200
15:15:27 127.0.0.1 GET /rut/phrase_view.php 200
15:15:37 127.0.0.1 GET /rut/category_list.php 200
16:20:32 127.0.0.1 GET /rut/main_menu.php 500
16:20:56 127.0.0.1 GET /rut/ 302
16:20:56 127.0.0.1 GET /rut/index.php 500
16:31:14 127.0.0.1 GET /rut/ 302
16:31:14 127.0.0.1 GET /rut/index.php 500
I started the web application and logged in and then let it set for over an hour. When I came back I selected a link to the home page and everything worked and I was still logged in. Now I can't duplicate the problem.
Well, all I can say is when installed and configured correctly php will work fine with IIS. My guess is still that you have some code somewhere that's causing some kind of memory leak or something causing the IIS thread to run out of resources and crash. IIS has some isolation modes you might want to try that might help you isolate the problem. Review exactly how you installed PHP on the web server, maybe something is configured wrong. Run phpinfo() and check that necessary modules are loaded.
nickka wrote:As I understand it, IIS and PHP have a threading conflict. Would installing FastCGI on the IIS server fix this problem?
I'm not aware of defined "issues". For myself I've always used isapi php and on low-usage machines have never had problems. My hosting company has provided php on windows IIS servers for years, I don't know how they set it up or what problems they may have overcome, but they have well over 100K customers many happily running php/mysql apps on IIS servers. http://www.crystaltech.com
It's a good idea to use FastCGI to run PHP, a lot more stable than ISAPI or CGI. Make sure they're using PHP build 5.2.6 or greater as that will be a lot more performant than previous versions.