Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter v4.3.8 and v4.4.0 Released!

I upgraded my system to the latest version; I hadn't experienced any issues with any version until today when I updated to version v4.4.0. Now, I'm encountering an error as if it can't find the ENVIRONMENT in the Codeigniter.php file:

Fatal error: Uncaught Error: Undefined constant "CodeIgniter\ENVIRONMENT" in /mysite.com/vendor/codeigniter4/framework/system/CodeIgniter.php:581

When opening the file, I do see the definition of the ENVIRONMENT variable.

protected function detectEnvironment()
// Make sure ENVIRONMENT isn't already set by other means.
if (! defined('ENVIRONMENT')) {
define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production'));

* Load any custom boot files based upon the current environment.
* If no boot file exists, we shouldn't continue because something
* is wrong. At the very least, they should have error reporting setup.
protected function bootstrapEnvironment()
if (is_file(APPPATH . 'Config/Boot/' . ENVIRONMENT . '.php')) {
require_once APPPATH . 'Config/Boot/' . ENVIRONMENT . '.php';
} else {
// @codeCoverageIgnoreStart
header('HTTP/1.1 503 Service Unavailable.', true, 503);
echo 'The application environment is not set correctly.';

// @codeCoverageIgnoreEnd

Messages In This Thread
RE: CodeIgniter v4.3.8 and v4.4.0 Released! - by emacdev - 08-28-2023, 10:46 PM

Theme © iAndrew 2016 - Forum software by © MyBB