Closed uno-de-piera closed 5 years ago
Does not appear to be a bug. If I set it in .env file it works just fine. Tested by dd(ENVIRONMENT)
within the spark file itself. Changes appeared as expected.
@uno-de-piera you are right. @lonnieezell i am facing same issue. CI_ENVIRONMENT variable value is not changing if i set CI_ENVIRONMENT=production in .env file then Debug Toolbar is still displayed and CI_ENVIRONMENT variable value is not changing.
because of $_SERVER['CI_ENVIRONMENT'] = 'development';
defined in rewrite. php
it is replacing CI_ENVIRONMENT variable value and if you remove above line in rewrite.php file then it will work.
file path : appstarter\vendor\codeigniter4\framework\system\Commands\Server\rewrite.php
Line : 20
CodeIgniter 4 version 4.0.0-beta.2 Context OS : windows 8.1 webserver : apache2.4 php version : 7.2
it's working properly without SPARK means only issue appears with spark server
screenshot https://pasteboard.co/I94mF2d.jpg
@lonnieezell you can close this issue.
The documentation says that for change the environment we have some options:
I tried all options but I'm unable to change the environment on my application.
The issue appears with spark server, if I serve my application with php -S localhost: -t=public all works fine.