Welcome Guest, Not a member yet? Register   Sign In
Error 500 - CLI.php - Use of undefined constant STDOUT
#5

As I understand, the problem appears because request from browser incorrectly identified as CLI one. This is why those constants are undefined.

@InsiteFX, I tried to put those definitions. Now I receive blank page (with no errors).

My solution is to put older version of is_cli() into app/Common.php, overriding updated one from system/Common.php.
(I've taken it from https://github.com/codeigniter4/CodeIgni...Common.php.)
 

PHP Code:
function is_cli(): bool
{
    return (PHP_SAPI === 'cli' || defined('STDIN'));


Now pages open fine.
Reply


Messages In This Thread
RE: Error 500 - CLI.php - Use of undefined constant STDOUT - by Taras - 08-16-2021, 01:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB