Database Connection

I want to logged in but when i m trying CDbConnection.connectionString cannot be empty.displayed at the browser, my database connection code is given below:Somebody help me plz.


 * Replace following tokens for correspondent configuration data


 * {DATABASE-NAME} ->   database name

 * {DATABASE-HOST} -> database server host name or ip address

 * {DATABASE-USERNAME} -> user name access

 * {DATABASE-PASSWORD} -> user password


return array(

	'env.code' => 'prod',

	// DB connection configurations

	'' => '',

	'db.connectionString' => 'mysql:host={DATABASE-HOST};dbname=blog_site',

	'db.username' => 'root',

	'db.password' => '',);

Try replacing the {DATABASE-HOST} token by localhost

i wanna a help to solve my problem?? plz


‘’ => ‘’,

'db.connectionString' => 'mysql:host={DATABASE-HOST};dbname=blog_site',

'db.username' => 'root',

'db.password' => '',

try this


			'connectionString' => 'mysql:host=localhost;dbname=blog_site',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => '',

                        'charset' => 'utf8',


I have ‘user’ table in database but it gives an error ‘The table “user” for active record class “User” cannot be found in the database.’, now what can i do?

Make sure ur table name & the value returned in the function tableName in ur model be same(case sensitive).

If ur table name is ‘user’, in ur model it should be,

public function tableName()


 return '{{user}}';


I am trying to login but i recieve such error. Property "User.login_attempts" is not defined. Help plz…

Declare the property ‘login_attempts’ in the class User.

It should be,

class User extends CActiveRecord


   public $login_attempts;




Anyone who are working on [color="#0000FF"]clevertech-YiiBoilerplate[/color]? I need some help. Tell me plz.