Showing posts with label cannot run yiic command. Show all posts
Showing posts with label cannot run yiic command. Show all posts

Monday, May 27, 2013

Solution for failed to run yiic

This is a common error we usually get if we did not redirect correctly to YiiRoot path.

PHP Warning:  require_once(/home/projectname/protected/../YiiR                                                                oot/framework/yiic.php): failed to open stream: No such file or directory in /ho                                                                me/projectname/protected/yiic.php on line 7

PHP Fatal error:  require_once(): Failed opening required '/home/projectname/protected/../YiiRoot/framework/yiic.php' (include_path='.:/usr/sh                                                                are/pear:/usr/share/php') in /home/projectname/protected/yiic.php on line 7

Step 1:
Check the following file:
- index.php 
Change the following path according to your YiiRoot path
$yii=dirname(__FILE__).'/../../YiiRoot/framework/yii.php';

Step 2:
- projectname/protected/yiic.php
Change the following path according to your YiiRoot path
$yiic=dirname(__FILE__).'/../../YiiRoot/framework/yiic.php';