Yii Framework and PDO extension

I am trying to install Yii, on windows, my web hosting (hostmonster) and my office (ubuntu).

The only installation successfully was on ubuntu, the others have the same error:


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

Requeriments verification were all ok. (Including PDO Mysql)

yiic webapp ../myapp
was OK

I modifying my protected/config/main.php to:


                    'connectionString'=>'mysql:host=localhost;dbname=mydb','username'=>'myuser, 'password'=>'mypwd', 'charset'=>'utf8'


Error is displayed after

../framework/yiic shell $HOME/public_html/myapp/index.php
>>model User

I read other post about it, but still can't find the solution. Extensions are loaded. I tried with sqllite too, with same results.


Make sure you have PHP PDO extension enabled. Also make sure it is enabled when you use yiic tool, because some PHP installation uses different php.ini when it is in CLI mode.

Thanks for your response, on my PHP.ini is enabled:





When I execute info.php from browser, modules are shown correctly:

PDO support enabled

PDO drivers sqlite2, sqlite, mysql

pdo_mysql          PDO Driver for MySQL, client library version 5.0.75

but if I run

php -c /$myDir/php.ini info.php > a.htm

This info is not loaded, only is present on execute command:

'–enable-pdo=shared' … '–with-pdo-mysql=shared' …