472,796 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 software developers and data experts.

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

Hello,

I am running WS2008 + IIS7 + FASTCGI + ZendCore.
I have not modified the default ZendCore php.ini configuration file.
Actualy, any kind of PHP error, warning or notice gives me immediately
a IIS 500 Error (Internal Server Error).
It is a good thing in production environnement.

For debuging purposes, I want temporary to be able to see PHP warnings
and errors embedded on the html page.

So I have set "display_errors = On" on the ZC admin panel.
But nothing changes ... I still always got error 500 on pages
containing errors, warning, or notice.

But I found that if I go to the website I want to debug using
http://localhost/mypage.php (so direclty on a browser on the
production server), I got the PHP errors embedded in the html page.
But when using the ip of the server, or the host header, I got error
500.

I also tried using ISAPI instead of FastCGI. The problem is still
quite the same, but in that case, only parse errors or undefined
functions gives me Error 500. Notices and Warning are well embedded.

Here is the IIS error log when getting an Internal Server Error
(testPage is a test page containing a division by Zero Warning).

--------------------------------------
MODULE_WARNING
ModuleName FastCgiModule
Data1 FASTCGI_RESPONSE_ERROR
Data2 PHP Warning: Division by zero in C:\inetpub\wwwroot\Catalogues
\testPage.php on line 6
ErrorCode 5
ErrorCode Access is denied. (0x5)

MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName FastCgiModule
Notification 128
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode 0
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode The operation completed successfully. (0x0)
--------------------------------------

Do anybody got an idea on how to get full PHP error reporing into the
HTML page with IIS7, FastCGI and Zend Core ?

Thanks,
Guillaume
Sep 17 '08 #1
3 5818
>I am running WS2008 + IIS7 + FASTCGI + ZendCore.
>I have not modified the default ZendCore php.ini configuration file.
Actualy, any kind of PHP error, warning or notice gives me immediately
a IIS 500 Error (Internal Server Error).
It is a good thing in production environnement.

For debuging purposes, I want temporary to be able to see PHP warnings
and errors embedded on the html page.
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.
>So I have set "display_errors = On" on the ZC admin panel.
But nothing changes ... I still always got error 500 on pages
containing errors, warning, or notice.
Sep 17 '08 #2
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.
I don't think the problem deals with header syntax ...
My php test page is as easy as :

<?php
$data = 0/0;
?>

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
Sep 17 '08 #3
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
Sep 18 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by...
5
by: Sam | last post by:
Guys facing a strange problem any clue would really rescue me.. i am using a ASP application with following things Server : Intel Xeon (TM) CPU 2GHz, 2GB RAM, 136GB HDD OS : Windows 2000...
5
by: Ben | last post by:
hi when I try to excecute an ASP (either JS or VB) script to say, access a database record, I get an Internal Server Error HTTP 500.100 Why? and HOW CAN I FIX THIS? Thanks
4
by: Patrick Masson | last post by:
Hello, Our configuration : Apache 2.0.53 PHP 5.0.4 PC Windows 2000 MATLAB 6.1 We work on a consulting project in France which involves MATLAB Web server,
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
3
by: Niranjan Roy | last post by:
When trying to create Web application project from inside my Visual Studio.Net, I am getting the following error: --------------------------- Microsoft Development Environment ...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
0
by: Ross | last post by:
Hi folks I have been designing a web service that is intended to extract information from a SQL server DB using parameterised SP's. So far I have 2 web methods. 1 GetPostCodeForSuburb(ByVal...
3
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! ...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.