Reputation: 3823
I'm going to my Yii project protected folder in Ubuntu command line and types:
yiic help
it returns:
yiic: command not found
But when I type:
php yiic.php help
it works properly.
php yiic
works too. Only problem when I type yiic without php. yiic
file has permission 775
and php-cli
installed.
What I'm doing wrong?
UPDATE
It works with:
./yiic
But I don't know what it means?
Upvotes: 3
Views: 5942
Reputation: 145
Modify $yiic path
$yiic=dirname(__FILE__).'/../yii_framework/framework/yiic.php';
then set permission to 777 by: sudo chmod 777
Upvotes: 0
Reputation: 2481
If you are running windows, no need for any %PATH% variable, just fallow these steps:
When you download the Yii from the website, there is a folder called
framework
inside the rar file you downloaded. Copy that folder to
your webserver root directory, which is in my case C:\wamp\www
.
In the www
folder also create a new folder called NewYiiApp
.
Inside this folder your new Yii application will be created and here you will write your controllers, models and
classes.
After that open your cmd using Start->Run->cmd.
Using CMD navigate to the framework
folder using cd
C:/wamp/www/framework
.
Open Windows Explorer and naigate to the PHP directory. In my case
it is located in C:\wamp\bin\php\php5.3.13
Ensure that this folder contains php.exe file
Paste the following line in the already opened CMD
C:\wamp\bin\php\php5.3.13\php.exe yiic webapp
C:/wamp/www/NewYiiApp
, but change my PHP folder path with yours
It will ask you: Create a web application under
C:/wamp/www/NewYiiApp
? Type Yes and hit ENTER.
Hope I helped!
Upvotes: 1
Reputation: 25312
It simply means that your project protected
folder is not in your PATH
environment variable.
Modify PATH
Here is a simple command to add a folder in PATH
:
export PATH=$PATH:/path/to/framework
You should add yii framework folder (the real yiic
command is here), not your project protected folder.
Or use a Symlink
If you don't want to modify your PATH
, you could create a symlink in /usr/bin
:
ln -s /path/to/framework/yiic /usr/bin/yiic
Upvotes: 8