Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, newbie here with a question about the location of the PHP error log. In my php.ini file, the "error_log" value was blank, but error logging was turned on, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    tuc
    tuc is offline
    Just Joined!
    Join Date
    Jun 2011
    Posts
    1

    Where is the PHP error log?


    Hi all, newbie here with a question about the location of the PHP error log.

    In my php.ini file, the "error_log" value was blank, but error logging was turned on, which (according to some other forum) means that errors should have been logged in the system's log file. But, I can't find where that is. I've looked in var/logs, but haven't found anything with PHP-related info.

    Does anyone know where PHP errors are logged when there is no PHP log file location set? Any help would be greatly appreciated. Thanks!

    *EDIT: Gah, looks like I was wrong -- errors are only saved to the system's log if you set "error_log = syslog" in the php.ini file. I'm guessing this means that PHP errors have not been logged anywhere. Can anyone confirm this?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,411
    Depends on your usecase, see here:
    PHP: Runtime Configuration - Manual

    It is usually a good idea to set it to a separate file,
    and even more to use syslog, so you are able to log locally and to a central log server.
    You must always face the curtain with a bow.

Posting Permissions

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