Zend Server Virtual Host - Error Message Output

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view

Zend Server Virtual Host - Error Message Output

This post has NOT been accepted by the mailing list yet.

I have a problem that I can't seem to figure out.

I'm developing a project with Zend Framework (on Zend Server) and everything works fine, also have the Error Controller modified to output custom error messages. Everything works.

Then I did set up a virtual host for this project - the custom error messages still work, but now, BELOW me error document output Appache outputs it's error message...

For a 404 error - the message below my error document is:

Not Found
The requested URL /index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

How can I get rid of this extra message output by Apache ??? I assume it is Apache that is outputting this message...

Here is the very simple virtual host I have set up:

# MyProject
<VirtualHost *:80>
DocumentRoot "C:\Program Files (x86)\Zend\Apache2\htdocs/MyProject/public"
ServerName myproject
ErrorDocument 404 /error/error

Like I said everything works just the extra error messages get output since I switched to virtual host...

Btw, I tried to fix this WITH and WITHOUT specifying an error document in the virtual host...

Thanx for your help in advance !

- Mike
Reply | Threaded
Open this post in threaded view

Re: Zend Server Virtual Host - Error Message Output

Exactly same problem, like i described here : http://zend-framework-community.634137.n4.nabble.com/Zend-Server-4-5-update-ErrorDocument-issue-tp2228516p2228516.html

No way to fix this, i can't figure out what's wrong with apache2.

If someone had the same problem when upgrading from Zend Server 4 to 5 on windows, please how did you fix it ?

I'm forced to re-install Zend Server 4 to work properly because even my Ajax calls can't be handled because when i set an 400 error code to response and output JSON, apache adds a error too, ex. :

{"errors":{"nickname":{"isEmpty":"Champ requis."},"email":{"isEmpty":"Champ requis."}}}<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<title>400 Bad Request</title>

Bad Request

<p>Your browser sent a request that this server could not understand.<br />
<p>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.</p>

No way :)

Any help plz ? Thanks.

Reply | Threaded
Open this post in threaded view

Re: Zend Server Virtual Host - Error Message Output

Hi Folks,

I apologize for reviving this thread but I am too pulling my hairs over this error. After battling with it for over 2 hours now I surrender to your wisdom.  :-)

Did anyone find a way to stop the webserver from appending this 400 page text to the responses? My situation is almost the same except that in my case I am sending xml output and the server appends it with the same html error.

Environment information (in case it's of any help):
Windows XP Development box.
Zend Server Community Edition v5.0
I am using Zend_rest (we are developing an xml api), I am also using the context switch helper to change the response format to text/xml.

It seems like other users out there have also experienced this problem but haven't been able to solve it. Below are 2 links to message board posts that express the very same symptom, unfortunatelly I can't figure out if they were able to solve it as they are in french :-S



Can anyone please advise? Thanks!

Original thread in Nabble: http://zend-framework-community.634137.n4.nabble.com/Zend-Server-Virtual-Host-Error-Message-Output-td1574698.html