How to enable debugging tools - display_errors and error_log

Discussion in 'ISPConfig 3 Priority Support' started by Honza, Dec 7, 2016.

  1. Honza

    Honza Member

    Hi,
    can you please provide instructions how to enable display_errors and error_log on per-site level?
    I found some instructions that it needs to be setup in "options" of particular site while logged in as "admin" account but I don't know the exact syntax and Googling it though gives me various results.

    Thank you very much in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The syntax for the php.ini field on the options tab of the website is the one of the php.ini file. This field works for the php modes php-fcgi and php-fpm.
     
  3. Honza

    Honza Member

    ok I enabled display_errors by inserting:
    Code:
    display_errors = On
    into field "Custom php.ini settings"

    But where do I put the error_log / how do I enable it ? Or is it the same log that that ISPConfig by default saves to: /var/www/example.com/log/error.log ?

    I thought there are two logs - PHP log an Apache log, which log is that one saved in /log/error.log ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    PHP logs by default into the /var/www/example.com/log/error.log file, the fact that you see no error there means just that the php process dies in a way that he can not send an error message anymore.

    You can set a different log in the php.ini field, it should not matter where you put this log as long as php can write to that file. you can e.g. use /tmp folder as well for debugging.

    The display errors setting will most likely not help as it means that php shall display errors in the html output, here the process dies without being able to send any output so you will probably not see error messages in the browser as well. But you may try it, it won't hurt.
     
  5. Honza

    Honza Member

    Ok - enabled both thank you for clarification.

    Where do I look for Apache logs then?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    /var/www/example.com/log/error.log
    /var/www/example.com/log/access.log
     
  7. Honza

    Honza Member

    ok so PHP and Apache logs are combined in: /var/www/example.com/log/error.log
    and Apache access logs are stored only in: /var/www/example.com/log/access.log

    Is that correct?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Both are apache logs, but php sends it error output by default trough apache, that's why you see php errors in the apache log-
     
  9. Honza

    Honza Member

    Alright - all clear.

    Thank you

    /close
     

Share This Page