473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 5882
>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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.