Yii 1.1: Q: My yiic tool cannot run model and crud commands. Why?

1 follower

Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

To solve this problem, please double check your CLI PHP configuration. You may also use the following command to make sure your CLI PHP is using the specified php.ini file:

php -c path/to/php.ini protected/yiic.php shell

Total 1 comment

#1605 report it
roobroup at 2009/06/05 05:49pm
How to solve this ? Please a bit more detail

I have this problem, even if I'm running a vanilla MAMP. So how do we configure the CLI PHP to use the right php.ini ?

Leave a comment

Please to leave your comment.

Write new article
  • Written by: qiang
  • Updated by: mishhh
  • Category: Tutorials
  • Yii Version: 1.1
  • Votes: No votes yet
  • Viewed: 6,894 times
  • Created on: Feb 11, 2009
  • Last updated: Feb 21, 2009