Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not find driver #2567

Closed
Lathaaa opened this issue Jun 18, 2013 · 2 comments
Closed

could not find driver #2567

Lathaaa opened this issue Jun 18, 2013 · 2 comments

Comments

@Lathaaa
Copy link

Lathaaa commented Jun 18, 2013

Hi.,
when i execute the link below
http://localhost/yii/testdrive/index.php?r=gii getting the page but when i click CRUD Generator (link: http://localhost/yii/testdrive/index.php?r=gii/crud) getting errors

CDbException

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

C:\xampp\htdocs\yii\framework\gii\generators\crud\CrudCode.php(44)

32 ));
33 }
34
35 public function requiredTemplates()
36 {
37 return array(
38 ‘controller.php’,
39 );
40 }
41
42 public function init()
43 {
44 if(Yii::app()->db===null)
45 throw new CHttpException(500,’An active “db” connection is required to run this generator.’);
46 parent::init();
47 }
48
49 public function successMessage()
50 {
51 $link=CHtml::link(‘try it now’, Yii::app()->createUrl($this->controller), array(‘target’=>’_blank’));
52 return “The controller has been generated successfully. You may $link.”;
53 }
54
55 public function validateModel($attribute,$params)
56 {
Stack Trace
#0

plz help me how to resolve this.

@samdark
Copy link
Member

samdark commented Jun 18, 2013

It's better to use forums for configuration questions.

@samdark samdark closed this as completed Jun 18, 2013
@Lathaaa
Copy link
Author

Lathaaa commented Jun 18, 2013

k.., thank you..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants