Welcome Guest, Not a member yet? Register   Sign In
Problem with 2.0.1 environments
#1

[eluser]carvingCode[/eluser]
I set a project I'm working on to use the 2.0.1 'environment' switch. I replaced the project's 'system' dir with a new 2.0.1 'system' dir. The project's index file has the ENVIRONMENT constant defined and the error_reporting switch statement.

I created a dir inside the config dir named 'development'. Placed my project's 'config', 'database', 'routes', and 'constants' config files in the new 'development' dir and replaced those with config files from a fresh 'config' dir (from 2.0.1).

When I launch the project in the browser, I get the following PHP error:

Code:
Warning: require(application/config/constants.php) [function.require]: failed to open stream: No such file or directory in C:\wamp\www\_cogs\ci\system\core\CodeIgniter.php on line 56

Fatal error: require() [function.require]: Failed opening required 'application/config/constants.php' (include_path='.;C:\php5\pear') in C:\wamp\www\_cogs\ci\system\core\CodeIgniter.php on line 56

If I move the 'constants' file out into main 'config' dir, I get:

Code:
An Error Was Encountered

Unable to determine what should be displayed. A default route has not been specified in the routing file.

If I move 'routes' out into the main 'config' dir, the project loads correctly.

Question: Is this the intended behavior?

TIA
#2

[eluser]InsiteFX[/eluser]
That's strange, I just checked the codeigniter.php file and it checks first for the environment constants.php file!

Did you copy over the new index.php file?

InsiteFX
#3

[eluser]bubbafoley[/eluser]
I don't think it's intended.

the constants.php problem was fixed shortly after 2.0.1 released -- https://bitbucket.org/ellislab/codeignit...9b4bcf1850

to fix the routes problem is here but hasn't been officially pulled yet. -- https://bitbucket.org/bubbafoley/codeign...8f22655f07
#4

[eluser]carvingCode[/eluser]
Insite - Yes, I used the new 'index'.

bubba - Thanks. I didn't think this feature was going to be so limited. Glad we'll get a fix. But, I downloaded 2.0.1 late morning today, so perhaps the 'constants' fix didn't get applied. Will wait for an announcement before doing anything else.

Thanks to both!
#5

[eluser]InsiteFX[/eluser]
Well I just tried it with CodeIgniter 2.0.1 not the Reactor!

And it works fine here.

No changes just clean install and copied the files over to development like you did!

InsiteFX
#6

[eluser]carvingCode[/eluser]
Right. I downloaded the 'Reactor' version, from here. Homepage -> upper right corner. Instead, I should have gone to 'Downloads'. The version under 'Downloads' seems to be the updated version. The 'Reactor' version is not.

Cornfusing.... Tongue

EDIT: Even with the other version, it does the same as I described above.
#7

[eluser]bubbafoley[/eluser]
yeah downloading from CodeIgniter.com is the 2.0.1 release version. The link I posted is a change that is yet to be released. Sorry for the confusion.
#8

[eluser]carvingCode[/eluser]
Has this fix been pulled into a release version yet?
#9

[eluser]videoinspector[/eluser]
why?
#10

[eluser]The Wizard[/eluser]
This is a crucial error and should have been fixed long ago.

I can't pull the constants too, changed CodeIgniter.php and now it works.




Theme © iAndrew 2016 - Forum software by © MyBB