After update 4.0 => 4.1.5, ERROR : Session: Initialization under CLI aborted. |
After update 4.0 => 4.1.5 i have error:
Session: Initialization under CLI aborted. How i can fixed it? In 4.0 i not have this error)
The message seem to be only in the debug log.
Where do you see it? and what did you do when you got the error? Stack trace?
Yes.
When i was open url http://site.ru/telegram i can read this error in log. This is code in controller: <?php namespace App\Controllers; class Telegram extends BaseController { public function index() { return view('welcome_message'); }
It seems strange.
Please debug why the is_cli() function returns true. https://github.com/codeigniter4/CodeIgni...#L644-L657
(11-14-2021, 09:00 PM)kenjis Wrote: It seems strange. ![]() This is details $_server: ![]() i open url: https://domain.ru/test/telegram/hook
Don't you have $_SERVER['REMOTE_ADDR'] and $_SERVER['HTTP_USER_AGENT']?
What's your Server API when you run phpinfo(INFO_GENERAL); ?
(11-15-2021, 06:48 PM)kenjis Wrote: Don't you have $_SERVER['REMOTE_ADDR'] and $_SERVER['HTTP_USER_AGENT']? var_dump($_SERVER): PHP Code: Array
It seems you don't have $_SERVER['HTTP_USER_AGENT'].
Workaround: 1. Copy the function is_cli() in system/Common.php to app/Common.php 2. Modify the function is_cli() in app/Common.php for you I created an issue: https://github.com/codeigniter4/CodeIgni...ssues/5336
(11-16-2021, 01:29 AM)kenjis Wrote: It seems you don't have $_SERVER['HTTP_USER_AGENT']. Thank you! It is work! |
Welcome Guest, Not a member yet? Register Sign In |