Yii Framework Forum: Can't use model command on shell with Sqlite3 but it can access from my app - Yii Framework Forum

Jump to content

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

Can't use model command on shell with Sqlite3 but it can access from my app Rate Topic: -----

#1 User is offline   tyohan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 08-October 08
  • Location:Bandung, Indonesia

Posted 08 November 2008 - 10:33 AM

I tried to develop a new application using Wamp PHP 5.2.6 and Yii 1.0b

I create my database from my php script with PDO function, and create some table. I tried to look in database using SQLite Manager and seems that table was successfully created.

Than I tried to generate the models but its return error like "can't find driver". Than I also tried to select some record from my database using DAO in my application and it was success to return data from my database. I'm sure that my web server own and activate the Sqlite3 PDO driver. I think the problem was model command on Yii shell application.

0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,898
  • Joined: 04-October 08
  • Location:DC, USA

Posted 08 November 2008 - 02:16 PM

Make sure you php-cli is using the correct php.ini.
0

#3 User is offline   tyohan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 08-October 08
  • Location:Bandung, Indonesia

Posted 08 November 2008 - 10:41 PM

Yes, you right. I found 2 php.ini in my Wamp directory. I change both to use same extension and it's working now.

Thank you.
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