The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error_log file in every directory?

Discussion in 'General Discussion' started by nurseryboy, Dec 13, 2006.

  1. nurseryboy

    nurseryboy Well-Known Member

    Joined:
    Mar 3, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Any ideas why an error_log file would be created in any directory thats under an account that produces a Apache/PHP/MySQL error? For example, http://www.example.com/mydir/index.php has some PHP errors that display when I try to access the file through the web. In /home/mysite/public_html/mydir, an "error_log" file is created, and all the errors are in it. I don't remember seeing this on previous CPanel servers. What can I do to change this back to the "normal" way of logging?

    Thanks,

    Matthew
     
  2. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    What's the normal way of logging you are familiar with? In php.ini you can control logging and error display. Look for the "Error handling and and logging" section. Most people these days (well they should anyway) leave display_errors as off and turn on log_errors. This is what you'll find yours is set to probably.

    Reason being, it doesn't show the error to people who are trying to find bad php scripts to exploit. If they don't see an error, it's harder for them to exploit it. :)

    Anyway, if you want to change those values then simply save the file and restart apache. You will be good to go.
     
  3. nurseryboy

    nurseryboy Well-Known Member

    Joined:
    Mar 3, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    I always thought there was a single file per domain that held the error messages for that domain, rather than an error_log file being created under each directory an error occurs.

    I agree with turning the displaying of errors off, but I'd like to keep logging on so I can see what's going on. I just don't like that a site could have 50 different error_log files throughout the site's public_html directory.

    Does that make sense?

    Thanks,

    Matthew
     
Loading...

Share This Page