Welcome Guest, Not a member yet? Register   Sign In
codeigniter 4.1.8 - Session: Initialization under CLI aborted.
#1

(This post was last modified: 02-11-2022, 07:43 AM by magu.)

Hi,
I get this error "Session: Initialization under CLI aborted." in a log file, when I try to call a controller (php public/index.php tools) via cli in CI development environment. I want to allow a cronjob to call a specific route to save some data in mysql.

This is the example I used: https://codeigniter.com/user_guide/cli/c...ello-world

After debugging for a while, I changed CI_ENVIRONMENT = development to CI_ENVIRONMENT = testing in the .env file and it worked. I was able to call the route via cli.

Why is calling a route via cli only allowed in testing mode? Is this a bug or is this the way it should work?

I am new to codeigniter. I hope someone can explain it. Thanks.

Greetings, magu
Reply


Messages In This Thread
codeigniter 4.1.8 - Session: Initialization under CLI aborted. - by magu - 02-11-2022, 07:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB