tags:

views:

1697

answers:

3

Recently my ISP switched our website to an IIS7.0 high availibility cluster. The website is running on PHP5.2.1 and I can only upload files (so no registry tweaks). I had tested the website before and everything seemed to be working, but now the checkout page fails with:

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

As error messages go, this isn't very informative. I've tried:

ini_set('display_errors', 1);
ini_set('error_log', $file_php_can_write_to );

but both don't seem to do anything.

Anyone know how to get better debugging output?

A: 
  1. Check apache's OR IIS's log
  2. Check Windows' event logs

Debugging HTTP 500 is relatively tough at times.

I have also tested, if configured normally, PHP errors should not return HTTP 500 when having any error.

My configuration: XAMPP 1.7.2, Apache 2.2.12 (IPv6 enabled) + OpenSSL 0.9.8k, PHP 5.3.0

thephpdeveloper
PHP errors are by definition an <a href='http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error'>HTTP 500 error</a>. Your setup has no bearing on the asker's reality as Apache defaults are very different from IIS defaults.
Chris Sobolewski
+2  A: 

Edit : Looks like we have a similar question in serverfault. Check it out

Turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.

You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”

Source

Shoban
Actually I'm using Firefox.
Matthijs P
This does change things but now I'm getting a plain text: "The page cannot be displayed because an internal server error has occurred."
Matthijs P
A: 

IIS does this, it's really annoying and I could not find a fix, which is what caused me to switch to an Apache server for my local machine. Unfortunately, if you don't have control over your server, the best you can do is either test it locally on an apache set up or ask your host to allow the error messages.

I did some googling, thisthis looks like what you need. Wish that was around when I was trying to get IIS running.

Chris Sobolewski