469,954 Members | 1,766 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

Setting a Custom Error Log

I'm trying to set up a simple redirect for errors and log them to a custom
file. I'm doing this for work on remote servers where I may not have
access to their error.log.

Anyway, the code I've written does not seem to be working. Errors are
still being logged to the Apache logs, and I'm having a difficult time
figuring out why.

Here's the code I'm using:

ini_set('error_log',"errorlog.txt");

I've checked file permissions, and everything is set to 777, so that
shouldn't be an issue. I've also tried entering the entire path with the
filename, but that didn't work either.

--
Randy Jackson
http://fourcolorexplosion.com
Jul 17 '05 #1
1 2773
Hi Randy,

I don't know about the error logging feature of php. But if you want to
make a redirect i guess you need to set up an error handler function
anyway. So maybe you can do the logging from there. See
http://www.php.net/manual/en/functio...or-handler.php

There is an error handler class here:
http://www.phpclasses.org/browse/package/1591.html

phpPeanuts also has one, see:
http://www.phppeanuts.org/site/index...orHandler.html
(This class is part of a much larger framework, but if i am right it
should require only a very few classes from the framework. Please let me
know if you think we should make this available as a separate download).

Greetings,

Henk Verhoeven,
www.phpPeanuts.org.
Randy Jackson wrote:
I'm trying to set up a simple redirect for errors and log them to a custom
file. I'm doing this for work on remote servers where I may not have
access to their error.log.

Anyway, the code I've written does not seem to be working. Errors are
still being logged to the Apache logs, and I'm having a difficult time
figuring out why.

Here's the code I'm using:

ini_set('error_log',"errorlog.txt");

I've checked file permissions, and everything is set to 777, so that
shouldn't be an issue. I've also tried entering the entire path with the
filename, but that didn't work either.


Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Angel | last post: by
9 posts views Thread by james.e.coleman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.