yiic webapp D:\wamp\www\test
sh.exe": yiic: command not found
yii webapp D:\wamp\www\test
Error: Unknown command "webapp".
You don't need yiic for installing Yii2 see the getting started guide for all the information you need . You can install really easly with composer
http://www.yiiframework.com/doc-2.0/guide-start-installation.html
Use init command in yii2
C:\xampp\htdocs\advanced>init
Yii Application Initialization Tool v1.0
Which environment do you want the application to be initialized in?
[0] Development
[1] Production
Your choice [0-1, or "q" to quit]
Related
So I downloaded a yii archive then extracted it into my xampp htdocs folder.
I wanted to create a new app but tutorials show to use yiic when creating new webapps. The problem is no yiic is found, and even in the directory, I do not see any yiic file to execute the program.
Should there be a yiic.bat?
I download Yii version 2.0 for the latest framework.
I also tried creating via Yii version 1.6 and the command worked.
The problem is i cant find yiic on 2.0.
Please run init command after installing YII from composer
sudo php init
It will ask for setting the environment, for beginning select "Development"
I am learning how to create console application with Yii 2.0. I have downloaded the Yii advanced package 2.0 which already has the default console application in it. I have copied that console application and pasted in my project. In that console application I have a TestController and an actionIndex() method, very basic following the documentation of Yii 2.0. When I run the command within my project:
php yii test
I've got the following error:
Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: yii\console\Request::enableCookieValidation'
When I run the same command in the downloaded Yii advanced application. It works fine. I don't know what causes the error in my project and where to check it. Does anyone have a clue? If you ask how my console application look like, it is literally copied from the Yii 2.0 advanced application. If I run:
php yii migrate
I get the same error.
Seems like you having this line in your console application config:
'request' => [
'enableCookieValidation' => ...
],
You should delete it because yii\console\Request compared to yii\web\Request simply doesn't have that property.
Rememeber that in Yii advanced template, there are three settings instances; common/config is the first instance, after that , many of these properties override
I am studying Yii framework in my android phone. I have an application called AndroPHP. It has a LightHttpd, MySql and PHP.
I can run CodeIgniter, Wordpress and Smarty in my phone but I don't have an idea how can I install a Yii framework. I searched in the Internet I can't find any correct solution.
I tried to install it using the yiic webapp in my android terminal emulator. And my error is
sh: yiic: not found
I have a YII framework extracted in sdcard/www/YII/
And I used the yiic in the framework folder.
To access the yiic I have this path:
root#android:/storage/sdcard0/www/YII/framework#
And to use the yiic I have this
yiic webapp sdcard0/www/bid
where bid is my folder under www
Any idea how can I install this framework? Or any android application that has a tutorial in installing Yii. Ok that's all thanks.
use ./yiic webapp sdcard0/www/bid you should use ./ since current directory is not included in path.
I wanted to try the appFog free plan to tryout my application I developed in Yii,I checked the jumpstart on appFog section that says that Yii applications are now supported by appFog
However I have checked all the documentations about framework, only drupal and wordpress were available, I searched all over the internet but I couldn't find the best docs for it
Then I decided to try to upload both Yii framework folder and my application and include an index.php file that includes the myapplication/index.php file, which seemed to be a nice try but some assest and other classes in yii are configured to look for yii framework in the root directory causing my application to crash with Yii error but not php error
If anyone has already tried or know where I can find a nice tutorial about Yii on appfog, I would really appreciate that.
I was able to deploy a test app without doing anything tricky:
Create a new php APP on AWS US East infrastruture from the appfog console
Download the latest Yii tarball and extract it to a FOLDER
Create test application:
$ cd FOLDER/framework
$ ./yiic webapp ../testdrive
Push the changes:
$ af update APP
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (71K): OK
Push Status: OK
Stopping Application 'APP': OK
Staging Application 'APP': OK
Starting Application 'APP': OK
Open http://APP.aws.af.cm/testdrive/ in browser:
Welcome to My Web Application
Congratulations! You have successfully created your Yii application.
Recently I've discovered Yii framework and started learning it. I've generated app skeleton using yiic tool, installed PHPUnit, SeleniumRC and attempted to run functional tests provided by skeleton app (I didn't change anything).
> phpunit functional/SiteTest.php
Report said following:
There was 1 error:
1) SiteTest::testLoginLogout
PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete().
ERROR: Element link=Logout not found.
I found that there was a 'Logout (demo)' link, not just 'Logout'. If I change php code in testcase, all tests pass ok. Is it error of Yii developers or am I missing something?
Yii 1.1.6 fixes this bug.
if($this->isTextPresent('Logout'))
$this->clickAndWait('link=Logout');