473,722 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ZendCore+FastCG I+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_er rors = 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_RESPONS E_ERROR
Data2 PHP Warning: Division by zero in C:\inetpub\wwwr oot\Catalogues
\testPage.php on line 6
ErrorCode 5
ErrorCode Access is denied. (0x5)

MODULE_SET_RESP ONSE_ERROR_STAT US
ModuleName FastCgiModule
Notification 128
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode 0
ConfigException Info
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 5953
>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_er rors = 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\wwwr oot
\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.webServe r/httpErrors/errorMode to
Detailed to do this - default is DetailedLocalOn ly so as not to expose
extra information to remote clients. The following appcmd command
will achieve that.

%windir%\system 32\inetsrv\appc md.exe set config -
section:system. webServer/httpErrors -errorMode:Detai led
Sep 18 '08 #4

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

Similar topics

10
10819
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 the browser, followed by a descriptive error message: Microsoft VBScript runtime error '800a000b' Division by zero followed by the number of the error-making line
5
3015
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 Advanced server. IIS5.0 Database: Oracle (Using ADODB to connect to the Database) App server running on the same machine (COM+)
5
8478
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
3724
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
10012
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 the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
3
807
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 --------------------------- The Web server reported the following error when attempting to create or
4
6209
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 pass the data to the web service. I already modified both web.config files and changed maxRequestLength to 60000(kb). When I debug the upload process, it seems the Web application can get the 50M file and read the data without problem, but when the...
0
3275
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 intSuburb As Int64) As postcode1 2 GetSuburbIDAndNameForSuburbStart(ByVal vchSuburb_Start As Char) As dsSuburbIDAndName The 1st web method GetPostCodeForSuburb is working OK, but the 2nd one
3
3597
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! I'm working on setting up a shopping cart for a one-product web site, and I'm using HTML and CSS, with ASP for the shopping cart. The ASP takes the information from the form on the shopping cart, and formats it in to two e-mails: one for the company...
0
8867
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8059
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3208
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2606
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2148
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.