CodeIgniter Forums
Custom ENVIRONMENT name - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Custom ENVIRONMENT name (/showthread.php?tid=72842)



Custom ENVIRONMENT name - alfaex - 02-18-2019

Hi.

I'm trying to use a custom ENVIRONMENT name like 'potato'

but when I define this name

index.php > 
PHP Code:
define('ENVIRONMENT''potato'); 


I create the folder 'potato' on the config folder

application > config > potato > config.php

And I get this message "The application environment is not set correctly."

If I change to 'testing' or 'development' it works ok.

It's not allowed to create custom development names?

Thanks.


RE: Custom ENVIRONMENT name - php_rocs - 02-18-2019

@alfaex,

According to the documentation ( https://codeigniter.com/user_guide/libraries/config.html#environments ) you should be able to name it whatever you choose. What version of CI are you using?

Also, is the permissions of the sub folder and the sub folder config file set correctly?


RE: Custom ENVIRONMENT name - alfaex - 02-18-2019

(02-18-2019, 05:34 PM)php_rocs Wrote: @alfaex,

According to the documentation ( https://codeigniter.com/user_guide/libraries/config.html#environments ) you should be able to name it whatever you choose.  What version of CI are you using?  

Also, is the permissions of the sub folder and the sub folder config file set correctly?

I found the answer later.

there a few lines above that if is not one of those 3, it exits

https://github.com/bcit-ci/CodeIgniter/blob/493ed6c472af3270cf995647a02c385c7f0500b3/index.php#L66

so I added my custom "word" to the switch

This is not explained in the documentation.

Thanks.