homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum


10+ Year Member

Msg#: 234 posted 12:10 am on Jun 7, 2003 (gmt 0)

I've got the following problem:
This is the .htacces file I'm using for my website:

AddType application/x-httpd-php .html
ErrorDocument 403 /yourlogin/error403.html
ErrorDocument 403 /error403.html
ErrorDocument 404 /yourlogin/error404.html
ErrorDocument 404 /error404.html
ErrorDocument 500 /yourlogin/error500.html
ErrorDocument 500 /error500.html

Everything works fine till an error document is requested by the server. It is not shown. But if I delete the first line ("AddType application/x-httpd-php .html") everything works fine (except the parsing).
Is there anybody who can find the problem?



WebmasterWorld Senior Member 10+ Year Member

Msg#: 234 posted 12:31 am on Jun 7, 2003 (gmt 0)

Try this line instead:

AddType application/x-httpd-php .php .html


10+ Year Member

Msg#: 234 posted 9:40 am on Jun 7, 2003 (gmt 0)

Thanks. But it doesn't work. I also tried to do it directly in the httpd.conf. Either doesn't work.
You can find the following line in the error.log:

[Sat Jun 07 11:38:33 2003] [error] [client] Premature end of script headers: c:/programme/server/php/php.exe


WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 234 posted 9:49 pm on Jun 7, 2003 (gmt 0)


WHy do you have multiple ErrorDocuments declared for each error type? You can declare different ErrorDocuments within different .htaccess files, but only one per type per .htaccess file will be used, and I'm not sure whether Apache will use the first or second one - I suspect the second...

If you have the option, increase you error logging level to see if you can dig any more help out of the error log.



10+ Year Member

Msg#: 234 posted 10:24 am on Jun 8, 2003 (gmt 0)

Well, I tried to eliminate every line, except:
ErrorDocument 404 /error404.html
Nevertheless, it doesn't work. The funny thing is, that the error 403 is fine. If I try to access forbidden folders with the browser - the correct document is shown. Another strange thing:
When I try to reach the following, non existing document:
the serverpage which says that error 500 occured appears. But not the one I defined in the .htaccess. Well, there should be a simple error 404. If I ad just one letter to the address like this:
everything is okay - the error404.html appears.

I tried to set the error level to debug. Unfortunately, I do not understand enough of the messages that appear. The only critical seems to be the one I posted before.

I give up!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved