Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Print PHP errors to screen (See related posts)

We keep error reporting off for safety reasons, but if you're baffled as to why something's not working, you can temporarily view errors by popping this into your script:


And fer pete's sake remember to remove it afterwards.

Comments on this post

theredhead posts on May 04, 2006 at 21:52
This has never worked for me. There is a decent explanation to why but i can't remember exactly. It's more foolproof to set this kind of thing in a .htaccess or better, your vhost configuration like so:

<IfModule mod_php5.c>
        # ...
        php_value display_errors on
        # ...

And as the previous poster said switch it off again when going production (and do it explicitly please)

You need to create an account or log in to post comments to this site.

Related Posts