PHP command line reports no errors

Even after checking all normal error display directives you still can’t get any errors to display on the command line when running a PHP CLI script.

Run your command line script with the -d display_errors flag:

$ php -d display_errors myscript.php

Note: The PHP you get with Centos 5 Apache is built with the display_errors directive hard-coded to ‘off’ and AFAIK there’s nothing you can do in php.ini to override this other than build your own PHP from source.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>