Slim (PHP) and HTTP ERROR 500, Internal Server Error

When starting out with Slim, sometimes people have difficulty getting it running and their browser returns a HTTP ERROR 500, Internal Server Error. There can be many reasons for this and the error message itself isn’t very helpful. To track down the issue, look in your error log. You will find a more detailed message indicating where the problem is.

Where is the error log? Using Apache, there are a few ways you can find the error log. In the [cci]httpd.conf[/cci] file look for the [cci]ErrorLog[/cci] directive. Typically it will be in [cci]logs/error_log[/cci], with respect to Apache’s installation. If your hosting setup doesn’t allow you to peek there (get new hosting) you can also use PHP to tell you where it is. You can echo [cci lang=”php”]phpinfo();[/cci] and look for “error_log” under ‘Core’, or get it directly with PHP.

[cc lang=”php”]