Welcome Guest, Not a member yet? Register   Sign In
Fresh install, CI_DEVELOPMENT in .env not work
#1

Dear all, i have just fresh install of Codeigniter from composer. After installation, i go to env, rename it to .env and uncomment CI_ENVIRONMENT = development.
But when i do "php spark serve" from terminal, it open localhost:8080 with "Page rendered in 0.0455 seconds Environment: production" in it footer page. Look like changing configuration in .env doesn't work anymore.
Is there anysolution? Thanks.
Look Page rendered in 0.0455 seconds

Environment: production
Page rendered in 0.0455 seconds

Environment: production
Reply
#2

(This post was last modified: 02-02-2024, 12:03 AM by luckmoshy.)

You are fine since you got that home Nothing is next, right? Please learn how to create an app with Codeigniter 4. Go here and start learning.


https://codeigniter.com/user_guide/tutor...pages.html

Happy learning!!!
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#3

(02-02-2024, 12:00 AM)luckmoshy Wrote: You are fine since you got that home Nothing is next, right? Please learn how to create an app with Codeigniter 4. Go here and start learning.


https://codeigniter.com/user_guide/tutor...pages.html

Happy learning!!!

Hello, thank for reply, yes, i have learn it and now i'm on Environment. https://codeigniter.com/user_guide/gener...ments.html
And until now i can not figure out why uncomment CI_ENVIRONMENT = development in .env file doesn't work.
Have you read my quenstion above? thanks.
Reply
#4

It seems you did right things.

If you can use CLI, what will you see if you run the following command?
Code:
$ php spark env
Reply
#5

(This post was last modified: 02-03-2024, 06:18 PM by okiewardoyo.)

Hi all, i try to install fresh codeigniter from composer again
Code:
composer create-project codeigniter4/framework ci-news
again, i rename 'env' files to '.env', and change :
Code:
#CI_ENVIRONMENT = production
to
Code:
CI_ENVIRONMENT = development
then i do in terminal 
Code:
php spark serve
the result still in 'PRODUCTION ENVIRONMENT'.
Please anybody can reproduce it? Thanks
Reply
#6

(This post was last modified: 02-03-2024, 06:33 PM by kenjis.)

This is not the direct cause of your issue, but you should use appstarter:
Code:
composer create-project codeigniter4/appstarter ci-news
See https://www.codeigniter.com/user_guide/i...stallation

I don't know why your environment is still production.

Try this:
Code:
composer create-project codeigniter4/appstarter ci-news
cd ci-news/
php spark env development
php spark serve
Reply
#7

(02-03-2024, 06:33 PM)kenjis Wrote: This is not the direct cause of your issue, but you should use appstarter:
Code:
composer create-project codeigniter4/appstarter ci-news
See https://www.codeigniter.com/user_guide/i...stallation

I don't know why your environment is still production.

Try this:
Code:
composer create-project codeigniter4/appstarter ci-news
cd ci-news/
php spark env development
php spark serve

Hi, thanks so much @kenjis, using 
Code:
composer create-project codeigniter4/appstarter
not use
Code:
composer create-project codeigniter4/framework
fix my issues.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB