Yii Framework Forum: Connection String Main.php - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Connection String Main.php database access Rate Topic: -----

#1 User is offline   SergioTosi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-February 14

Posted 20 February 2014 - 03:28 AM

what is the connection string in main.php for database access

Thanks
0

#2 User is offline   chandran 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 08-October 12
  • Location:Austria

Posted 20 February 2014 - 04:04 AM

Hi,
Default is db .. you can check in config/main.php

check this


'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=e-learning',
			'emulatePrepare' => true,
[size=2]			[/size][size=2]'username' => 'root',[/size]
			'password' => '',
			'charset' => 'utf8',
		),


Thanks
chandran nepolean

My own extension:
http://www.yiiframew...sion/ejqueryte/

My wiki
http://www.yiiframew...checkboxcolumn/

If it work dont hesitate to click +1 button
0

#3 User is offline   SergioTosi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-February 14

Posted 20 February 2014 - 04:55 AM

no good! this solution:

CDbConnection failed to open the DB connection: could not find driver


D:\Php\EasyPHP-5.3.6.0\www\yii\framework\gii\generators\model\ModelCode.php(60)

The my database is Microsoft access "prova.accdb" e non file mysql.

other solution?
0

#4 User is offline   SergioTosi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 20-February 14

Posted 21 February 2014 - 03:19 AM

in my main.php the connection string

'db'=>array(
'connectionString' =>
'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Php\EasyPHP-5.3.6.0\www\yiic\protected\data\WebFail.accdb;
Persist Security Info=False;',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),


in model generator, after botton preview, message error table "apparecchi" does not exist
0

#5 User is offline   Lê Văn Chiến 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 23-November 11
  • Location:Viet Nam

Posted 23 February 2014 - 08:57 PM

Thank for share !
0

#6 User is offline   Agus Rizwan Ichwani 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 24-February 14

Posted 24 February 2014 - 03:33 AM

Good day

I have been trying to create my first web app for yii, but I am struggling to get the correct results.

Warning: YiiBase::include(C:\xampp\htdocs\yii\framework/web/CWebApplication.php) [function.YiiBase-include]: failed to open stream: No such file or directory in C:\xampp\htdocs\yii\framework\YiiBase.php on line 403

Warning: YiiBase::include() [function.include]: Failed opening 'C:\xampp\htdocs\yii\framework/web/CWebApplication.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\yii\framework\YiiBase.php on line 403

Fatal error: Class 'CWebApplication' not found in C:\xampp\htdocs\yii\framework\YiiBase.php on line 125

please help me..
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users