I'm testing some php files on my development server and when there is an error I get: HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. It does not tell me any details like what line of the file is causing the error. How can I get this to show up? I'm running it on IIS 7 on Vista. I installed PHP in C:\Program Files\PHP and this is the location from where IIS is getting the php-cgi.exe file. I checked the php.ini file inside C:\Program Files\PHP and error_reporting = E_ALL & E_STRICT display_errors = On display_startup_errors = On What else do I need to check or change to start seeing detailed error messages?
My php.ini file seems to have no effect on the configuration settings and I found this out because when I ran phpinfo, display errors is turned off and in my php.ini file it's set to on. There is something wrong with either my php.ini file or for some reason PHP is ignoring it and loading it's default settings.
Check the error_log file. It should contain a line explaining the reasons why Apache generated an Internal Server Error. Most popular reasons are permissions (in Linux) and .htaccess misconfiguration (to check it, rename .htaccess to something else and try again.) Best of luck!
Sorry, my bad, Just in case it helps you: http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx (the author explains how to enable detailed error reporting on IIS 7 at the end of the article) Anyway, I thought Vista also included a permissions structure similar to Linux's (from what I've heard). If it does, have you tried to give the PHP file full permissions? http://social.technet.microsoft.com...y/thread/fe6fc533-8688-4faf-848c-ba98cd6d6ec0
Yes, the system and I have full access permissions to the php.ini file. Even when I remove the php.ini file from C:\Program Files\PHP\ nothing changes in the phpinfo() output. It still uses the same local and master values which tells me that something is completely ignoring the php.ini file.
I think the problem is because the php is running as cgi. I don't know much about cgi, but I think cgi throws a 500 error in case of script errors. You must log your php errors in a file, and check that file. the last error should be the one causing the problem. Thanks
bartolay is right. It could be an .htaccess issue or other server configuration issue. Are you able to hit other pages? If you save: <?php echo "hello world"; ?> to a test.php file does it display properly?