Next, as I run the following DOS commands I receive an error message:
C:\host\yii-1.1.8.r3324\framework>yiic webapp ../anamnesi
Could not open input file: C:\host\yii-1.1.8.r3324\framework\yiic
C:\host\yii-1.1.8.r3324\framework>
I tried some variations: yiic.bat instead of yiic; c:\host\yii-1.1.8.r3324\anamnesi instead of ../anamnesi; but I got always the same result.
I also re-start the PC; re-start Apache service and re-install the whole Yii but without any result.
The problem has been solved only after specify the extension php:
C:\>php5_2\php C:/host/yii-1.1.8.r3324/framework/yiic.php webapp /host/yii-1.1.8.r3324/anamnesi
Create a Web application under 'C:\host\yii-1.1.8.r3324\anamnesi'? [Yes|No] y
...
First thing is to check if you have PHP in the command line
try with
php -v
This should print the PHP version… if you get something like “command not found” it means that you dont have PHP CLI installed or maybe you have it but it’s not in the PATH
In that folder there are two files "yiic" and "yiic.bat" so it seems that your OS tried to execute the one without the extension and that is a script for linux
So it would work even if you called directly the rigth one like
I have started to go through "Agile Web Application Development with Yii 1.1 and PHP5" and it states some that some scripts have to specifically be called from a certain directory.
Since it states to do:
% cd WebRoot
% YiiRoot/framework/yiic webapp demo
That you do it that way?
So:
% cd C:\xampp\htdocs\
% cd YII\framework\yiic.bat webapp demo
I don’t know if you have to do this for a fact, sine I have never tried to do it in a different way, but when I follow directions I try to do it exactly so as to eliminate any possible issues.
About this kind of issue, I try to prompt the yiic migrate command in the prompt (windows 7 with xampp) and doesn’t work.
When I type in the prompt "C:\xampp\htdocs\myWebApp\protected\> ./yiic migrate create create_some_table" I receive a message error saying: "." is not a recognized command…