i'm still new to yii framework.
so, i want to try running yiic so that i could see the structure of the files created.
but, i could not run it in console. Does anyone have a solution? thanks.
I'm using wamp on win xp.
i go to the directory of the yiic framework
its in D:\wamp\www\framework\
and run yiic and any other variations per Larry Ullman's blog. but still got: "..." is not a recognizable internal/ external command...
How should i be able to run yiic? thanks.
just read this:
http://www.yiiframework.com/doc/cookbook/3/
:)
It's always better to follow yii official documentation.
You can find Installing Yii process step by step here
documentation> tutorial > The Yii Blog Tutorial > Testdriving with
Yii # Installing Yii
here is the link http://www.yiiframework.com/doc/blog/1.1/en/start.testdrive#installing-yii
If you getting this kind of error when you try to use yiic webapp ..\app-name
'"php.exe"' is not recognized as an internal or external command,
operable program or batch file.
Open the yiic.bat file under yii framework folder ( C:\wamp\www\framework ) and change the bellow line
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
to
if "%PHP_COMMAND%" == "" set PHP_COMMAND=C:\wamp\bin\php\php5.4.16\php.exe
php5.4.16 this might be change accroding to you php version, please check in C:\wamp\bin\php folder before change
Cheers
Related
I am trying to configure my Yii framework and I am stuck in one step. I run command yiic webapp ..\..\yiitestapp and "many" of these to start the app but I got a same error every time.
yii is not recognized as an internal or external command,operable program and batch file
I also set my environmental variable as ";D:\xampp\php"
And my Yiiframework location is "D:\Xampp\htdocs\yiiframework\yiiframework"
Can any one guide me for the right solution?
You need to run yiic webapp ....\yiitestapp from the Yii\framework folder.
I am new Apache Geronimo.I read the following link for deploying repository. Even I don't know where will these concept will be useful. just i am learning.
I created sub-directory under and created .xml file according to the above link.
here, I faced the problem while deploying time. deploy(.bat) deploy <GERONIMO_HOME>/repo2/repo2.xml command is not working.
<GERONIMO_HOME>=C:\Users\Infratab Bangalore\geronimo-tomcat7-javaee6-3.0.1
I run the following command for deploying.but it's not working.
deploy(.bat) deploy C:/Users/Infratab Bangalore/geronimo-tomcat7-javaee6-3.0.1/repo2/repo2.xml
How can I fix this.
You should do following bellow steps:
1. Log in to the Administrative Console
2. Select Advanced on left bar
3. Go to Resources -> Repository
PHPStrom is a great IDE. I really like it. But I bumped into an issue. I can't find instructions how to configure debugging for Yii console application.
I set debugging for Yii web application and it works fine.
Any help will be highly appreciated.
Upd1: Actually I figured out that there are 3 cases of the Yii console application.
Standard Yii console application (command files in the protected/commands folder of the webapp)
Standalone Yii console application (independent console aaplication without web application)
[My case] YiiBooster console application (YiiBooster has advanced, but good structure for medium or big projects)
After some period of time I found the solution. In my case it must be split in 2 parts:
Configure XDebug in PHPStorm
Get appropriate Xdebug version. Use this wizard from official xdebug site; just copy&past your phpinfo() response into window and it will tell you which version you must download.
Install it and make sure that XDebug is activated (phpinfo() must return xdebug section in the response). Use the following link for detailed instructions
Set XDebug as debugger for PHP in Project Settings
[The steps below are specific for Yii console application debugging]
Find yiic.php file in your project and Run or Debug it first time.
After this go Run->Edit Config and set name of your command in the arguments with required parameters.
Now set breakpoints in your code and activate "Listen debugger connections” button.
Debugging Yii command actions
If you want to use actions (like actionRebuildIndexes) in the command it needs to call the parent::run method in the run() function.
public function run($args) {
parent::run($args);
return 0;
}
For debugging it needs to specify the action name in the arguments for yiic.php Run Configuration (see image above)
There is article in jetbrains blog about it.
you just set your php.ini and add an parameter in xdebug like this:
xdebug.remote_autostart = 1
then you can debug your console application.
Hello guys I am new to yii frame work and I am following larry ullman's instructions
on the e-book.
The problem I have is: when I'm creating new migration I keep on getting this error
The migration directory does not exists:application.migrations
I use the command : $ yiic migrate create <name>
Thank you guys for helping me understand yii.
I have noticed that the answer for this issue have been answered in the comments section, but may not be noticable for others.
Just to summarize:
You need to execute the yiic inside the protected directory
There should be an yiic.bat inside the protected directory
In some cases, the migration directory inside the protected directory must be available beforehand and is writable.
I am newbie to yii. I have made database in MySQL.After that I want to migrate the database.So for that I made a folder called migration under protected and from framework folder whenever I am writing command yiic migrate create --name=add_table in terminal.It is showing error like yiic: command not found
I am using ubuntu 11.04.So what is the problem behind that.
cd down to the folder containing the yiic file and try the command then. If that doesn't work try to put "php" in front of the command like:
php yiic migrate create --name=add_table
Or you could try:
./yiic