Yii Framework Forum: PDO Issue - Yii Framework Forum

Jump to content

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

PDO Issue Rate Topic: -----

#1 User is offline   queej 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 04-February 10

Posted 27 February 2010 - 04:56 PM

I've created a new Yii app on a shared host, and the yiic is having trouble with finding the PDO class. I am pointing the yiic to the right ini file using:

#!/usr/bin/php -c /home/authentr/public_html/php.ini

The ini file contains the directives:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so


I've checked and re-checked my connection setup:

                                'db'=>array(
                                             'connectionString' => 'mysql:host=localhost;dbname=mydbname',
                                             'emulatePrepare' => true,
                                             'username' => 'myusername',
                                             'password' => 'mypassword',
                                             'charset' => 'utf8',
                                             ),


I am still getting the errors:

<b>Warning</b>:  include(PDO.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/home/authentr/public_html/pantry/yii-\
1.1.0.r1700/framework/YiiBase.php</b> on line <b>338</b><br />
<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Failed opening 'PDO.php' for inclusion (include_path='.:/home/authentr/public_html/pantry/yii-1.1.0.\
r1700/framework/pantry/protected/components:/home/authentr/public_html/pantry/yii-1.1.0.r1700/framework/pantry/protected/models:/usr/lib/php') in <b>/home/authentr/public_html/pa\
ntry/yii-1.1.0.r1700/framework/YiiBase.php</b> on line <b>338</b><br />
<br />
<b>Fatal error</b>:  Class 'PDO' not found in <b>/home/authentr/public_html/pantry/yii-1.1.0.r1700/framework/db/CDbConnection.php</b> on line <b>296</b><br />


Any idea on what else to try?
0

#2 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 27 February 2010 - 05:59 PM

Hello queej,

We had a similar problem with one of our applications and it took a while to figure out that the pdo-module was not enabled on the server. Maybe this is the problem in your case aswell?

View Postqueej, on 27 February 2010 - 04:56 PM, said:

I've created a new Yii app on a shared host, and the yiic is having trouble with finding the PDO class. I am pointing the yiic to the right ini file using:

#!/usr/bin/php -c /home/authentr/public_html/php.ini

The ini file contains the directives:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so


I've checked and re-checked my connection setup:

                                'db'=>array(
                                             'connectionString' => 'mysql:host=localhost;dbname=mydbname',
                                             'emulatePrepare' => true,
                                             'username' => 'myusername',
                                             'password' => 'mypassword',
                                             'charset' => 'utf8',
                                             ),


I am still getting the errors:

<b>Warning</b>:  include(PDO.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/home/authentr/public_html/pantry/yii-\
1.1.0.r1700/framework/YiiBase.php</b> on line <b>338</b><br />
<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Failed opening 'PDO.php' for inclusion (include_path='.:/home/authentr/public_html/pantry/yii-1.1.0.\
r1700/framework/pantry/protected/components:/home/authentr/public_html/pantry/yii-1.1.0.r1700/framework/pantry/protected/models:/usr/lib/php') in <b>/home/authentr/public_html/pa\
ntry/yii-1.1.0.r1700/framework/YiiBase.php</b> on line <b>338</b><br />
<br />
<b>Fatal error</b>:  Class 'PDO' not found in <b>/home/authentr/public_html/pantry/yii-1.1.0.r1700/framework/db/CDbConnection.php</b> on line <b>296</b><br />


Any idea on what else to try?

Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#3 User is offline   queej 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 04-February 10

Posted 27 February 2010 - 07:08 PM

Thanks, but it shows up in the phpinfo() output as installed.
0

#4 User is offline   queej 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 71
  • Joined: 04-February 10

Posted 27 February 2010 - 07:28 PM

Solved. The path to the PECL extensions in the php.ini file was incorrect.
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