PHP Fatal Error when running yiic.php shell

I get the following when running yiic.php from windows command line



C:Program FilesApache Software FoundationApache2.2yii_sourceframework>php -


c C:Windowsphp.ini yiic.php shell ../../htdocs/blog/index.php





PHP Fatal error:  Cannot redeclare class Yii in C:Program FilesApache Software


 FoundationApache2.2htdocsyii_testframeworkyii.php on line 29


Line 27 - 29 looks like this



class Yii extends YiiBase


{


}





Did you use yiilite.php in index.php?

Quote

Did you use yiilite.php in index.php?

Nope, yii.php

I had no problem using the yiic tool before, unless I’m missing something on the command syntax  ???

Are you using APC?

I am getting a similar message…  any input on how to resolve this will be appreciated. 

FYI… I use XAMPP on a windows machine

you allready tested your instalation – XAMP?

like in index.php

<?

echo 'hi';

?>

regards.

Go to the parent directory to run this command since you are using relative path to include yii.php. It assumes the current directory is the one where you execute the command.

Quote

Are you using APC?

Nope not using APC anymore, as it gave me issues previously here

Quote

I am getting a similar message...  any input on how to resolve this will be appreciated. 

FYI… I use XAMPP on a windows machine

I have no LAMP stack installed, just plain old Apache HTTP Server 2.2.  PHP and MySQL was also installed seperately

Check my comments.

by going to the parent directory you mean the following command



C:Program FilesApache Software FoundationApache2.2yii_source>php -


c C:Windowsphp.ini framework/yiic.php shell ../htdocs/blog/index.php


Ok, solved it by running the following commands



C:Program FilesApache Software FoundationApache2.2yii_sourceframework>php y


iic.php webapp ../../htdocs/dummy




C:Program FilesApache Software FoundationApache2.2yii_sourceframework>cd ../../htdocs/dummy




C:Program FilesApache Software FoundationApache2.2htdocs/dummy>php ../../yiic_source/framework/yiic.php shell index.php


and voila



Yii Interactive Tool v1.0 (based on Yii v1.1-dev)


Please type 'help' for help.  Type 'exit' to quit.


>>


still having issues…  could it be my PHP installation?  (i'm using XAMPP)

Your php is enabled with some extensions (as listed in the error message) that could not be found. Try to modify your php.ini to disable those extensions first.