Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Apr 2003
    Posts
    21

    Default error_log created in public_html - how to prevent?

    We recently moved our sites to a new server (both old and new servers running cpanel though) and now each site is having its errors logged to a error_log file in the document root instead of just to the standard error log that we're accustomed to checking in Cpanel.

    How do we make sure errors are only logged so that we can view them in cpanel and prevent that error_log file from being created and used?

  2. #2
    Member ModServ's Avatar
    Join Date
    Oct 2006
    Location
    Egypt
    Posts
    228
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Edit this file

    /usr/local/lib/php.ini
    then search for

    log_errors
    and change it to Off instead of On

    ModServ for Hosting & Web Services Solutions
    URL: http://www.modserv.com.eg

  3. #3
    Member
    Join Date
    Apr 2003
    Posts
    21

    Default

    Quote Originally Posted by Me_388 View Post
    Edit this file

    then search for

    and change it to Off instead of On
    php errors will still be logged to the cpanel error log though, correct?

  4. #4
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by IIIBradIII View Post
    We recently moved our sites to a new server (both old and new servers running cpanel though) and now each site is having its errors logged to a error_log file in the document root instead of just to the standard error log that we're accustomed to checking in Cpanel.

    How do we make sure errors are only logged so that we can view them in cpanel and prevent that error_log file from being created and used?
    Quote Originally Posted by IIIBradIII View Post
    php errors will still be logged to the cpanel error log though, correct?
    Errors logged by Apache will be available in cPanel.

    Unless disabling PHP error logging is intended I would not advise this; the best solution in my opinion is to correct the problem that triggered the error.

  5. #5
    Member ModServ's Avatar
    Join Date
    Oct 2006
    Location
    Egypt
    Posts
    228
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I agree with cPanelDon you must not disable the error_logs as it will help you much to solve a lot of problems.

    ModServ for Hosting & Web Services Solutions
    URL: http://www.modserv.com.eg

Similar Threads & Tags
Similar threads

  1. Prevent email sending to public_html !
    By thelirou_ in forum E-mail Discussions
    Replies: 1
    Last Post: 04-07-2011, 12:12 PM
  2. prevent e-mail account from being created
    By bsasninja in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-31-2009, 11:10 AM
  3. Error /home/newsite/public_html can't be created
    By mtarlan in forum Database Discussions
    Replies: 2
    Last Post: 08-10-2007, 07:27 AM
  4. How to prevent /usr/locap/apache/logs/error_log flooding from PHP errors ?
    By WebHostDog in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-18-2007, 10:33 AM
  5. error_log in user's public_html directory
    By marius in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 05-19-2005, 09:52 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube