a little PDO problem [Solved]

Hello,

I discovered Yii some days ago. I fallow "the definitive guide to Yii" but i encounter a little problem for "implementing CRUD operations" ("Creating first Yii application").

At the prompt, when i execute the sub-commands "model User" I have the fallowing message :

Fatal error : Class 'PDO' not found in ..frameworkdbCDbConnection.php on line 274

PDO extensions are enabled. (php_pdo , php_pdo_mysql). Phpinfo shows that the extensions are enabled.

I watched for the different php.ini files and extensions are enabled.

So, i tried to watch if it was the good php.ini file who was loaded when using command line and it is.

I wonder from where the problem can come. I am stuck. I search on the forum. I tried differents solutions like related to pdo troubles and but no one works.(like emulatePrepare).

Configuration : php 5.2.6 + mysql 5.0.51b

If someone can help. Thank you in advance.

are you using pdo_sqlite or pdo_mysql in your app?

I am using pdo_mysql.

Edit :

I manage to make it work. I was not using the local yiic command for the application that's why the pdo class was not found.

Thank you.

Still sounds like a problem with your php.ini. If you're on Linux, can you try this, just to make absolutely sure:

<?php


php -r 'phpinfo();' | grep -i pdo

You should find lines like these:

PDO


PDO support => enabled


PDO drivers => mysql


pdo_mysql


PDO Driver for MySQL, client library version => 5.0.51b


I just managed to make it work.

I was not using the local yiic command for the application that's why the pdo class was not found.

Thank you Will and Mike.