How to view PHP error log in case of error 500 (Internal Server Error)

Error 500 (Internal Server Error) means some malfunctioning of the PHP scripts. More details about a malfunctioning can be obtained from a PHP error log.

There are a few ways to do so.

Method 1: Logs app

  1. Install free Logs app in your Installer.
  2. In the app’s settings, enable PHP error logging to file php.log.


  3. Repeat an action resulting in an error.
  4. View new records added to log file php.log.


Method 2: Commands for .htaccess file

  1. Add these commands to the end of file .htaccess, if your web server supports them:

    php_flag display_errors Off
    php_value error_reporting 2147483647
    php_flag log_errors On
    php_value error_log ./wa-log/php.log
    
  2. Repeat an action resulting in an error.
  3. View new records added to log file wa-log/php.log.
In addition to file php.log, you can also obtain useful troubleshooting information from other log files. Most useful are usually files updated last.

0 comments

    Add comment

    To add a comment please sign up or login