Click here to get back home

Re: ZendCore+FastCGI+IIS7 : Cannot embed PHP errors in response HTML. Always get 500 - Internal server error

 HomeNewsGroups | Search

comp.lang.php - PHP programming language discussions 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Re: ZendCore+FastCGI+IIS7 : Cannot embed PHP errors in response HTML. Always get 500 - Internal server error Gordon Burditt 09-17-2008
Posted by Gordon Burditt on September 17, 2008, 5:21 pm
Please log in for more thread options


show/hide quoted text

Have you tried looking at the HTML source of the page you get?

My guess is that you get a 500 error because you get PHP errors in
the middle of header info, and this makes for bad header syntax.

To see the errors, force header output *before* doing whatever it
is that draws errors.

show/hide quoted text

Posted by guillaume.braux on September 17, 2008, 7:03 pm
Please log in for more thread options


show/hide quoted text

I don't think the problem deals with header syntax ...
My php test page is as easy as :

<?php
$data = 0/0;
show/hide quoted text

I would like "PHP Warning: Division by zero in C:\inetpub\wwwroot
\Catalogues " beeing printed on the return page ... Instead of it, I
got 500 error, even with display_errors=On.
I have tested it on a "standard" LAMP server, and it works (error is
printed) ...
I also tried to process the test page directly on a console (using
"php -f mypage.php"), and the warning is well printed in the console.
So the problem seems not to come from the php interperter.

Zend is in a full default configuration state. The only param I have
changed is the display_errors config.
I tried also with PHP manualy installed from the official binaries (so
without the zend package). The problem is exacly the same ...

I am using a clean IIS7 server, and have PHP FastCgi module mapping to
the websites needing PHP support.

It may come from IIS7 or FastCGI. But where ? That is the question ...

Any more ideas ?

Guillaume

Posted by guillaume.braux on September 18, 2008, 9:05 am
Please log in for more thread options


Found the solution :

You would need to set system.webServer/httpErrors/errorMode to
Detailed to do this - default is DetailedLocalOnly so as not to expose
extra information to remote clients. The following appcmd command
will achieve that.

%windir%\system32\inetsrv\appcmd.exe set config -
section:system.webServer/httpErrors -errorMode:Detailed

Similar ThreadsPosted
internal server error August 10, 2004, 10:23 am
Apache/PHP : internal server error October 12, 2005, 1:53 pm
500 Internal Server Error w/ PHP 5 and Vista October 4, 2007, 9:13 am
Newbie - Internal Server Error when using fopen() February 19, 2006, 12:54 pm
mail function generates 500 internal server error May 12, 2006, 4:01 am
internal server error for php url submit containing chinese on windows 2000 August 2, 2005, 9:36 pm
Error 500 - Internal Server Error August 24, 2005, 11:24 am
Error #2003 the server has no response May 28, 2008, 9:44 am
mail() function error: (SMTP server response: 501 5.5.4 Invalid Address) May 11, 2008, 12:53 pm
Embed PHP script in HTML page... September 13, 2004, 9:55 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy