Search the Community
Showing results for tags 'model generator'.
Found 1 result
Barely installed Yii and already ran into trouble. I'm running Windows 7 and use Wamp and MySQL for my database. After installation, I went to the url http://localhost/myproject/index.php?r=gii and selected Model Generator. I've edited both main.php and console.php in C:\wamp\www\myproject\protected\config folder to include the following: 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=myproject', 'emulatePrepare' => true, 'username' => 'myproject', 'password' => 'thepassword', 'charset' => 'utf8', ) However, when trying to preview the model, the first field "Database Connection" gives me the following error: "A valid database connection is required to run this generator." I had the previous line in comments, and now tried changing into: 'db'=>array( 'connectionString' => 'mysql', ), Although it did not help. I've tried googling around and people have had similar problems, but editing both of the files solved their problems. For some reason it won't work for me. Is 'localhost' all I need to point it to wamp and phpMyAdmin? Can you help?