Welcome Guest, Not a member yet? Register   Sign In
environment killed my project
#1

[eluser]bgreene[/eluser]
maybe i did something very stupid but just downloaded ver 2.01 and everything stopped working. I traced the fault to the new constant ENVIRONMENT in common,config,loader and db. I couldn't see it being set anywhere so i set ENVIRONMENT = '' in constants but this didnt work either. then i discovered i needed to change config.php to
// line 211
// $file_path = APPPATH.'config/'.ENVIRONMENT.'/config'.EXT;
// if environment == '' then we have 2 slashes
if ( defined(ENVIRONMENT) && (ENVIRONMENT != "")) $file_path = APPPATH.'config/'.ENVIRONMENT.'/config'.EXT;
else $file_path = APPPATH.'config/config'.EXT;
similar change for common,loader and db.
apologies if i missed something obvious and called wolf when there is none!
#2

[eluser]wiredesignz[/eluser]
The ENVIRONMENT variable is being set in index.php and it should not be. Upgrading CI to a newer version should not require alteration of files outside of the system directory. ENVIRONMENT should be a config variable or at least set in constants.php
#3

[eluser]bgreene[/eluser]
arrgh! I hadn't replaced my index file with the new one. but the switch(environment) coughs if no value set so it has to be given a non-blank value which upsets the existing well-established tree structure




Theme © iAndrew 2016 - Forum software by © MyBB