I don't recommend to use CLI command via web.
But If you really want to run it, try:
Code:
--- a/system/CLI/CLI.php
+++ b/system/CLI/CLI.php
@@ -180,6 +180,7 @@ class CLI
// we need to define STDOUT ourselves
// For "! defined('STDOUT')" see: https://github.com/codeigniter4/CodeIgniter4/issues/7047
define('STDOUT', 'php://output'); // @codeCoverageIgnore
+ define('STDERR', 'php://output');
}
}