Setting a Custom Error Log

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randy Jackson

    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

  • Henk Verhoeven

    #2
    Re: Setting a Custom Error Log

    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


    There is an error handler class here:


    phpPeanuts also has one, see:

    (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:[color=blue]
    > 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.
    >[/color]

    Comment

    Working...