I'm having trouble setting an Environment for Yii Framework. Probably is an easy task for someone who knows it, but the documentation of this ir rather poor and I couldn't solve it by myself. Any help would be apprecitated, I don't get to SO until I waste all my resources.
The error I get is:
Fatal error: Uncaught exception 'Exception' with message '"SetEnv YII_ENVIRONMENT <mode>" not defined in Apache config.' in /home/(ommited)/app/extensions/Environment.php:235
Stack trace: #0 /home/(ommited)/app/extensions/Environment.php(209): Environment->getMode(NULL, false) #1 /home/marcelo/myprojects/bocaweb/boca-sitioweb/html/index.php(10):
Environment->__construct() #2 {main} thrown in /home/(ommited)/app/extensions/Environment.php on line 235
My mode_development.php
<?php
return array(
'yiiDebug' => false,
'yiiTraceLevel' => 3,
'configWeb' => array(
'components' => array(// Database
'mongodb' => array(
'class' => 'EMongoClient',
'server' => 'mongodb://(ommited)',
'db' => '(ommited)',
'RP' => array('RP_PRIMARY', array())
),
),
),
'configConsole' => array(),
);
index.php
<?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 1);
//Envirment and global
require_once(dirname(dirname(__FILE__)) . '/app/components/ArtfosEnvironment.php');
require_once(dirname(dirname(__FILE__)) . '/app/globals.php');
$env = new ArtfosEnvironment();
defined('YII_DEBUG') or define('YII_DEBUG', $env->yiiDebug);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', $env->yiiTraceLevel);
require_once($env->yiiPath);
$env->runYiiStatics(); // like Yii::setPathOfAlias()
$yiiApp = Yii::createWebApplication($env->configWeb);
$yiiApp->run();
Is the Yii framework folder in the directory beside your local? Make sure that your site knows the location of the framework as that's where it will get all it's resources.
Try I would like to move yii framework folder outside of www access