CodeIgniter4: Bug: CLI request from command line

Direction Trying to run the CLI command through Visual studio code or CMD but zero response from the output that has been set. To be shure i’ve created an empty file with default index and an echo with text ‘test’. This still doesn’t respond in any way.

Describe the bug No response or execution on the coding when executing the controller/method through CMD.

command: php index.php cronjob index

Example:

namespace App\Controllers;

use App\Controllers\BaseController;

class Cronjob extends BaseController
{
	public function index()
	{
		echo 'test';
	}
}

CodeIgniter 4 version 4.1.3

Expected behavior, and steps to reproduce if appropriate A response as the documentation stated: Documentation command line

Context

  • CI: 4.1.3
  • OS: Windows 10
  • PHP version: 8.0.7

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I’ve activated every last one of them, except for oci8_12c oci8_19 pdo_firebird and pdo_oci but still no response. I’m stuck at this point because i’ve got no clue what is going on, thinking about setting up a dev server with ubuntu and give you access to that because i’m at a dead end right now…

Make a fresh copy of Codeigniter and just add the Cronjob controller with the code you post. Start from there. If you want to give me access I can help you. Just let me know.