Hi, Code:
I'm using DDEV with Docker to host it, webserver image using NGINX and PHP 7.4.
Hi,
After some investigation I found that there are changes in system/Common.php for is_cli() method that cause current issue. It's identified as CLI in condition: PHP Code:
because PHP_SAPI equals to fpm-fcgi and TERM variable equals to xterm. Is this correct behavior? How this should be fixed? Your getting the errors because STDOUT is not defined, which could be your environment. PHP Code:
Try that. What did you Try? What did you Get? What did you Expect? Joined CodeIgniter Community 2009. ( Skype: insitfx )
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. PHP Code:
Now pages open fine. Hi! Your issue, along with some others, has a fix already in the provisional 4.2 branch.
(08-18-2021, 09:00 PM)paulbalandan Wrote: Hi! Thanks, that code works fine too.
[quote pid="389403" dateline="1629345651"] Quote:Hi! [/quote] Hi, folks! You can always get the latest version of CodeIgniter from the GitHub Developer Page. CodeIgniter 4 - Developer Version. CodeIgniter 4 web framework What did you Try? What did you Get? What did you Expect? Joined CodeIgniter Community 2009. ( Skype: insitfx )
10-15-2021, 04:26 PM By the way, I discovered branch 4.2: "codeigniter4:4.2 - Make CLI detection as independent as possible from interface #4844" Looks like this isn't accessible branch. I was facing this issue in a Docker container, I solved it using a ready-made solution from another professional (a Dockerfile). Thank you for your help. |