hi , I am just yesterday try to use Yii Framework.
Setup: Win xp 64bit
virtual host name: http://127.0.0.1/Yii…root/testdrive/
webroot: c:/Progam Files/EasyPhp2.0b1/www/Yii1.0.1/framework/Webroot/testdrive
framework installed at c:/Framework/Webroot/www/Yii1.0.1/framework/
I have created the application using the yiic tool.
I have created product table using phpmyAdmin.
modified the /protected/config/main.php like this:
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
// application components
'components'=>array(
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to set up database
'db'=>array(
'connectionString'=>'mysql:host=localhost ;dbname=sale',
'username'=>'root',
'password'=>'',
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'webmaster@example.com',
),
);
Then I go to command Prompt and type this command:
C:\Program Files\EasyPHP 2.0b1\www\Yii1.0.1\framework>yiic shell WebRoot/testdrive/index.php
When I issue the 'model Product product' command I get this error:
YiiBase::include PDO.php : failed to open stream : No such file or directory.
Source file:
C:\Program Files\EasyPHP 2.0b1\www\Yii1.0.1\framework\YiiBase.php (292)
Any hint ?
Please Help me. Thanks in advance