back to krasimirtsonev.com
to blog's home page

How to display php errors when display_errors is set to off

I successfully finished an interactive project for one of my clients. We did a great job and finally I had to install the system on their server. I received the FTP and MySQL information from their IT team, but when I uploaded all my files the site didn't work at the first time. The server didn't show any errors and I wasn't able to find out the problem.

I checked the server's settings by uploading a file with phpinfo() method in it and found that display_errors was set to 'off'. First I tried the following lines of code:



But it doesn't work. Then I found the solution - just two lines of code in .htaccess file, placed in the main directory of the site.

Sharing ...
Commenting ...
blog comments powered by Disqus