hello yii community!
So, this is my first time with yii. I have gotten the yiic to function properly and to generate my demo app.
I am trying to test the different functionalities of gii and when clicking the CRUD generator or the model generator i get:
CException
Property "CDbConnection.0" is not defined.
with other infos:
{
211 unset($args[0]);
212 $class=new ReflectionClass($type);
213 // Note: ReflectionClass::newInstanceArgs() is available for PHP 5.1.3+
214 // $object=$class->newInstanceArgs($args);
215 $object=call_user_func_array(array($class,‘newInstance’),$args);
216 }
217 }
218 else
219 $object=new $type;
220
221 foreach($config as $key=>$value)
222 $object->$key=$value;
223
224 return $object;
225 }
226
227 /**
228 * Imports a class or a directory.
229 *
230 * Importing a class is like including the corresponding class file.
231 * The main difference is that importing a class is much lighter because it only
232 * includes the class file when the class is referenced the first time.
233 *
234 * Importing a directory is equivalent to adding a directory into the PHP include path.
line 222 being hightlighted
I have tried many solutions and searched for a while and therefore am sharing this with the community
when i go to the requirements page i get this:
2430
maybe this has something to do with my database
here is my main.php where are my db infos:
// application components
‘components’=>array(
‘user’=>array(
// enable cookie-based authentication
‘allowAutoLogin’=>true,
),
// uncomment the following to enable URLs in path-format
/*
‘urlManager’=>array(
‘urlFormat’=>‘path’,
‘rules’=>array(
‘<controller:\w+>/<id:\d+>’=>’<controller>/view’,
‘<controller:\w+>/<action:\w+>/<id:\d+>’=>’<controller>/<action>’,
‘<controller:\w+>/<action:\w+>’=>’<controller>/<action>’,
),
),
*/
/*‘db’=>array(
‘connectionString’ => ‘sqlite:’.dirname(FILE).’/../data/testdrive.db’,
),*/
‘db’=>array(
‘connectionString’ => ‘mysql:host=mysql5.pulp-communications.ch;dbname=here i write the name’,
‘emulatePrepare’ => true,
‘username’ => ‘here i write the name’,
‘password’ => ‘*******’,
‘charset’ => ‘utf8’,
),
after wondering if it was the fact that i was working localy
i uploaded everything online, created a db with phpmyadmin, and knows that it is functional and accessible
i saw someone with a similar question but no real answer!! hmm hope this is not a tought problem
thanks again and don’t hesitate to ask more info!!