InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search
  • Home
  • > Tutorials
  • > PHP cookbook

PHP command line – show errors

By admin on Nov 29, 2015

To show errors on php command line (cli) without changing php.ini

php -d error_reporting=E_ALL code1.php

Sample php code code1.php

<?php
echo $non_existing_var;
?>

Sample output

php cli default case

$ php code1.php 
// No output if php.ini is not set for cli

php cli with error_reporting

$ php -d error_reporting=E_ALL code1.php 

Notice: Undefined variable: non_existing_var in /opt/tmp/code1.php on line 2

Suggested posts:

  1. Command line – top IP list from apache access log
  2. Ssh automation on Amazon EC2 Ubuntu Linux
  3. Perl command line – replace multi line comments
  4. Command line – run python webserver
  5. Imagemagick – how to create animation on command line
  6. Generate ssh public key from private key on command line
  7. Command line – scale a video using ffmpeg
  8. Memcache – how to dump all keys and values on command line
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Linux/Unix Command Line, PHP, PHP cookbook, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2021 InfoHeap.

Powered by WordPress