Call to undefined function CodeIgniter\Config\putenv() |
In production environment. I got this issue. The hosting provider had blocked the putenv() function for security reason.
Quote:Fatal error: Uncaught Error: Call to undefined function CodeIgniter\Config\putenv() in /www/wwwroot/idp/printerp_api/vendor/codeigniter4/framework/system/Config/DotEnv.php:92 Stack trace: #0 /www/wwwroot/idp/printerp_api/vendor/codeigniter4/framework/system/Config/DotEnv.php(77): CodeIgniter\Config\DotEnv->setVariable() #1 /www/wwwroot/idp/printerp_api/vendor/codeigniter4/framework/system/Config/DotEnv.php(43): CodeIgniter\Config\DotEnv->parse() #2 /www/wwwroot/idp/printerp_api/public/index.php(30): CodeIgniter\Config\DotEnv->load() #3 {main} thrown in /www/wwwroot/idp/printerp_api/vendor/codeigniter4/framework/system/Config/DotEnv.php on line 92 When i'm looking for the source of DotEnv.php, it didn't check the function exists or not. PHP Code: protected function setVariable(string $name, string $value = '') So i have to remark the 92nd line of codes. |
Messages In This Thread |
Call to undefined function CodeIgniter\Config\putenv() - by RizonBarns - 07-07-2022, 01:55 AM
RE: Call to undefined function CodeIgniter\Config\putenv() - by Rarach - 04-05-2023, 11:48 AM
RE: Call to undefined function CodeIgniter\Config\putenv() - by kenjis - 04-05-2023, 05:45 PM
RE: Call to undefined function CodeIgniter\Config\putenv() - by huangyz - 08-31-2024, 01:03 AM
|