Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 3 of 3

This is a discussion on Disable error_logging? in the VPS & Dedicated forum
Hello everyone, I was wondering how l would go about disabling php error logging on my VPS account. I don't mind the php errors being ...

  1. #1
    JPC Senior Member
    Join Date
    Nov 2003
    Posts
    73

    Question Disable error_logging?

    Hello everyone,
    I was wondering how l would go about disabling php error logging on my VPS account. I don't mind the php errors being output on the page, but l don't want the errors logged to an error_log file in the same folder. Any help would be awesome!

    Thanks,

  2. #2
    JPC Dream Team
    Join Date
    May 2007
    Location
    JPC
    Posts
    635
    Is there any special reason behind disabling error logging in php. It is not recommended to set errors to output on page rather than in the error_log file. However, you can do this by setting display_errors to on in php.ini file and setting log_errors to off. Here is the part of php.ini file related to this.

    Code:
    ; Log errors into a log file (server-specific log, stderr, or error_log (below))
    ; As stated above, you're strongly advised to use error logging in place of
    ; error displaying on production web sites.
    log_errors = On
    Code:
    ; Print out errors (as a part of the output).  For production web sites,
    ; you're strongly encouraged to turn this feature off, and use error logging
    ; instead (see below).  Keeping display_errors enabled on a production web site
    ; may reveal security information to end users, such as file paths on your Web
    ; server, your database schema or other information.
    display_errors = On
    I would also recommend you to go through the php error_reporting manual here.
    Jawad A.
    JaguarPC
    Site Links:
    Knowledge Base | Network Status

  3. #3
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    You don't have to log them to a file in the same folder. That indeed isn't great. I use one central log for my account, which isn't accessible from the web either.

    Code:
    ; Log errors to specified file.
    error_log = "/home/<your account>/log/php_errors.log"
    The point of the error logging is that usually, as a webmaster, you want to see all the errors, so you can take action. On the other end, your users shouldn't be bothered with those. Showing them can in fact be a security risk, as they can easily be way too telling and help a hacker find his way in.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •