voidstate Posted August 21, 2008 Share Posted August 21, 2008 We have recently spent over a month upgrading our internal CMS to PHP 5. We tested the changes we had to make for PHP 5 compatibility thoroughly on a development machine. Then we put the PHP 5 version of the CMS onto our remote production web server, and tested it again. No problems. This week we went live. Almost immediately, customers began complaining that their site was either coming up blank or showing a HTTP 500 Internal Server Error. However, from our offices we just couldn't get any of the sites to crash. Eventually, we managed to replicate the error by using RDC to browse from a remote machine. Here's what we've noticed: 1. Maybe 19 out of 20 times you get the HTTP 500 Internal Server Error when entering the address of the CMS. 2. Once you get the CMS to load, if you navigate between the pages, they load fine every time. 3. From our company office, the CMS loads every time, regardless of whether you're entering the URL or following a link. 4. It makes no difference which browser is used. We are running PHP 5.2.6 on IIS 6 and Windows 2003 Server. The database backend is MSSQL Server. We use ISAPI Rewrite for pretty URLs. Here are the headers returned by the server: HTTP/1.x 500 Internal Server Error Connection: close Date: Thu, 21 Aug 2008 15:30:05 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET, PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Type: text/html What on earth is going on? There is nothing in the Windows event logs. I turned on PHP error logging but the file remains empty. Is this an IIS problem? How can I get more information on what's causing the errors? Anyone seen anything like this before? Can anyone shed any light at all on this problem? Thanks in advance Fergus Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 21, 2008 Share Posted August 21, 2008 I turned on PHP error logging but the file remains empty.Use a phpinfo(); statement and see what the setting actually is to make sure it was actually turned on. Also, make sure that error_reporting is set to E_ALL. Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/#findComment-622139 Share on other sites More sharing options...
lemmin Posted August 21, 2008 Share Posted August 21, 2008 Does this happen for html files as well? Or, how about a PHP file that doesn't have any php code in it? Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/#findComment-622141 Share on other sites More sharing options...
Mchl Posted August 21, 2008 Share Posted August 21, 2008 I also had this error appearing when my hosting comapny moved from PHP4 to PHP5. They suggested it was caused by corrupted .htaccess file and advised me to delete it and recreate anew. Worked for me. Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/#findComment-622265 Share on other sites More sharing options...
DyslexicDog Posted August 21, 2008 Share Posted August 21, 2008 NM you're running IIS. Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/#findComment-622281 Share on other sites More sharing options...
voidstate Posted August 26, 2008 Author Share Posted August 26, 2008 Sorry for the late reply, all. Been off work... I turned on PHP error logging but the file remains empty.Use a phpinfo(); statement and see what the setting actually is to make sure it was actually turned on. Also, make sure that error_reporting is set to E_ALL. Yes, I set the following in PHP.ini: log_errors = On error_log = "C:\PHP5\errors.log" ; FH 21-08-2008 Both showed up fine in phpinfo() dump. And it defintitely worked because when I first looked at it, the log file showed a different error with the php.ini file that I quickly resolved. What really confuses me is why it's loading up fine from one place but giving 500 errors from others. Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/#findComment-625889 Share on other sites More sharing options...
PFMaBiSmAd Posted August 26, 2008 Share Posted August 26, 2008 Also, make sure that error_reporting is set to E_ALL How about that part? If error_reporting is set to prevent reporting some types of errors, that includes logging them as well. Quote Link to comment https://forums.phpfreaks.com/topic/120725-php4-to-php5-upgrade-http-500-internal-server-errors-please-help/#findComment-625894 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.