PDO warning yet its installed?

>> model Employee

Warning: include(PDO.php): failed to open stream: No such file or directory in /home/oo/public_html/yii/framework/YiiBase.php on line 338

Warning: include(PDO.php): failed to open stream: No such file or directory in /home/oo/public_html/yii/framework/YiiBase.php on line 338

Warning: include(): Failed opening ‘PDO.php’ for inclusion (include_path=’.:/home/oo/public_html/test/protected/components:/home/oo/public_html/test/protected/models:/usr/lib/php:/usr/local/lib/php’) in /home/oo/public_html/yii/framework/YiiBase.php on line 338

Fatal error: Class ‘PDO’ not found in /home/oo/public_html/yii/framework/db/CDbConnection.php on line 301

-bash-3.2$


I’m not sure really sure why it isn’t working now could it just be the info for my db is incorrect? I have checked to verify pdo is configured and i did have a database setup at one point…

http://opticoverload.com/phpinfo.php

There is my phpinfo anyone have any suggestions? Thanks

Read the note about PDO in the red box on this page:

http://www.yiiframework.com/doc/guide/quickstart.first-app-yiic

That’s silly they would deprecate such a feature… I mean why not have both ways? I often use my shell to accomplish task quickly.

And this should still work…

I get the same error through gii as well…

PHP Error

Description

include(PDO.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

Source File

/home/oo/public_html/yii/framework/YiiBase.php(338)

I was talking about the second box:

yea i tried that, i even updated my php with pdo support, no dice.

Check again. If you’re on linux, try this:


[web0 yiilatest]# php -i | grep PDO

PDO

PDO support => enabled

PDO drivers => mysql, sqlite, sqlite2

PDO Driver for MySQL, client library version => 5.0.90

PDO Driver for SQLite 3.x => enabled



If you’re on windows, you can also do a “php -i” and inspect the output for PDO drivers. You’ll very probably find, that they are missing for you. So you need to check the php.ini file used for PHP on CLI. To find the right file, use “php --ini”:


[web0 yiilatest]# php --ini

Configuration File (php.ini) Path: /etc/php/cli-php5

Loaded Configuration File:         /etc/php/cli-php5/php.ini

Scan for additional .ini files in: /etc/php/cli-php5/ext-active

Additional .ini files parsed:      /etc/php/cli-php5/ext-active/apc.ini,

/etc/php/cli-php5/ext-active/xdebug.ini



Then edit this file and enable PDO + drivers.

root@opt [~/install/php-5.3.3/pear]$ php -i | grep PDO

PHP Warning: Unknown: It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Chicago’ for ‘CDT/-5.0/DST’ instead in Unknown on line 0

PDO

PDO support => enabled

PDO drivers => sqlite, sqlite2

PDO Driver for SQLite 3.x => enabled

root@opt [~/install/php-5.3.3/pear]$

I think upgraded may have fixed it but caused a problem with the date cause when i attempt to run the shell at all i get this

<div class="version">

PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Chicago’ for ‘CDT/-5.0/DST’ instead in /home/oo/public_html/yii/framework/views/exception.php on line 71

as well… Not sure if this is a conflict between latest php and yii or just my configuration… I’ll investigate further…

Sweet, i fixed it just had to put a timezone in the php.ini file…