Jump to content
Larry Ullman's Book Forums

bartleyg

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About bartleyg

  • Rank
    Newbie
  1. Larry, Just to make sure I didn't have some other custom configuration issue causing the problem I created a new web application on another machine. I then created the commands/SayHelloCommand.php file identical to the one I used earlier and attempted to run the console command: $ ./yiic sayhello PHP Error[2]: include(SayHelloCommand.php): failed to open stream: No such file or directory in file /opt/local/www/yii/framework/YiiBase.php at line 427 #0 /opt/local/www/yii/framework/YiiBase.php(427): autoload() #1 unknown(0): autoload() #2 /opt/local/www/yii/framework/console/CConsoleComman
  2. Also, The commands getxml and sayhello are both commands I created trying to figure out what was happening with the error. They have never worked either. Bart
  3. Larry, I created a new file FurryWhiteBunnyCommand.php with the following class: <?php class FurryWhiteBunny extends CConsoleCommand{ public function bunnies(){ echo "I am a bunny\n"; } } and I get the following: $ ./yiic furrywhitebunny bunnies PHP Fatal error: Cannot redeclare class FurryWhiteBunny in /opt/local/www/myapp/protected/commands/FurryWhiteBunnyCommand.php on line 7 That is the only error message. No other bunny files/classes on my system. If I type ./yiic help it show the command: $ ./yiic help Yii command runner (based on Yii v1.1.14) Usage:
  4. Larry et al., After working through several web applications I have started to work on a console application. To get started I created a simple class in in the commands folder called SayHelloConsole.php. When I try to run the application ./yiic SayHello I receive the following error: $ ./yiic sayhello PHP Fatal error: Cannot redeclare class SayHello in /var/www/myapp/protected/commands/SayHelloCommand.php on line 6 I have no other classes with the same name and I cannot track down where an additional import is taking place. I have tried removing: 'import'=>array( 'appl
×
×
  • Create New...