Use of undefined constant STDOUT – assumed ‘STDOUT’ (this will throw an Error in a future version of PHP)

Error from loading CLI script in Web

Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP)

Solution

    if(!defined('STDIN'))  define('STDIN',  fopen('php://stdin',  'rb'));
    if(!defined('STDOUT')) define('STDOUT', fopen('php://stdout', 'wb'));
    if(!defined('STDERR')) define('STDERR', fopen('php://stderr', 'wb'));

Tags:

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.