ErrorDocument without line in error_log

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
b888
Forum Newbie
Posts: 2
Joined: Tue Oct 10, 2006 1:59 am

ErrorDocument without line in error_log

Post by b888 »

Greetings.

I'm using ErrorDocument to dynamically create the content.

Code: Select all

ErrorDocument 404 /i/404.php
Each time user requests something that is missed, it's automatically created, saved to disk in appropriate place (so next time 404 do not even appear) and given to user.
Php script that process request do change http reply status as well to 200 via

Code: Select all

header('HTTP/1.0 200 OK');
The problem is that i can't prevent lines in error_log. Every time user's request come - even if it outputs 200 OK new line appears in error_log.
Can anyone suggest me how to solve this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Don't use ErrorDocument? a good mod_rewrite should probably suffice. We have mountains of mod_rewrite threads, tips and so forth.
b888
Forum Newbie
Posts: 2
Joined: Tue Oct 10, 2006 1:59 am

Post by b888 »

In fact, previous version was using mod_rewrite.
The problem of mod_rewrite is that it increases process time for each request (tests showed up to 20-30% increase). And since reply time is very important in my case i would rather suffer unreadable error_log than use mod_rewrite again :)
Post Reply