Questions tagged [yiic]

The term `yiic` stands for Yii Framework Console, which is a CLI to run Yii Console application commands.

Yii Console applications are mainly used to perform offline work needed by an online Web application, such as code generation, search index compiling, email sending, etc. Yii provides a framework for writing console applications in an object-oriented way. It allows a console application to access the resources (e.g. DB connections) that are used by an online Web application.

23 questions
5
votes
5 answers

how to fix CConsoleApplication.user undefined in a command class in yii framework?

I am having that error , whenever I ran my simple cron script in shell , any idea how to fix that thing ?, from the error itself, it says the .user is undefiend, when I placed the 'user' => array( // enable cookie-based authentication …
sasori
  • 5,249
  • 16
  • 86
  • 138
2
votes
4 answers

Yii - How to access to model and call action in yiic

I have an action that prints "Hello World": public function actionStart() { echo 'Hello World'; } I will to run a cron job that calls this action every minute. How I can do this with yiic ? UPDATE: I create console app. I have cron.php inside…
Chalist
  • 3,160
  • 5
  • 39
  • 68
2
votes
1 answer

Cron job for PHP yiic command

I have created a php yiic command as class StartCommand extends CConsoleCommand { public function run($params){ Yii::log("Cron Job has started"); } } When I run the command php yiic Start, I get the result in the log. And I have…
Ajey
  • 7,924
  • 12
  • 62
  • 86
2
votes
1 answer

Yii: CDbException' with message 'CDbCo mmand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement

I am new with Yii and I tried to set up a database using the "yiic migrate" command. My migration looks like this: createTable('tbl_proveedor',…
Allfarid Morales García
  • 1,455
  • 2
  • 17
  • 27
1
vote
2 answers

Yiic migration for multiple database

Is it possible to run Yiic migrate create command for multiple databases ? I have a Multi-Tenant Data Architecture, one source code and multiple database for client. each client will use same source code and but a separate database. Ex. …
dev1234
  • 5,376
  • 15
  • 56
  • 115
1
vote
0 answers

Any easy ways to automate creation of Yii DB migration code

I have started using Yii (1.1) in order to keep syncronized db schemas between different environments. My questions is: are there any easy ways to automate the writing of the Up() and Down() methods with SQL code? At the moment, if I add a new table…
Martin
  • 1,066
  • 3
  • 20
  • 36
1
vote
0 answers

yii translation - words with multiple meaning

I am using Yii's translation functionality to translate characters from English to other languages. I sometimes come across a word that has multiple meanings, so I have to make it unique somehow. Is there someway to do this in Yii? Documentation…
tdjfdjdj
  • 2,391
  • 13
  • 44
  • 71
1
vote
1 answer

Not able to create Table through YIIC Migreate create

I just started learning YII framework and now I am facing an issue while trying to create table through YIIC MIGRATE. Below is the code of my table. class m140627_072906_create_test_table extends CDbMigration { public function up() { …
Robindra Singha
  • 141
  • 1
  • 2
  • 12
1
vote
1 answer

Yii, yiic throws an exception CConsoleApplication.defaultController

exception 'CException' with message 'Property "CConsoleApplication.defaultContro ller" is not defined.' in ..\yiisoft\yii\framework\base\CComponent.php:173 Have someone stucked with this error? What's the solution? Thanks for responce. exception…
Gleb
  • 11
  • 3
1
vote
2 answers

yiic: CDbConnection failed to open the DB connection

My DB connection works perfectly in web application. But when I try the same settings in console application it fails (I wrote connection settings in console.php file). CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access…
arfname
  • 379
  • 1
  • 4
  • 10
1
vote
2 answers

php - ./yiic rresque start does nothing

I installed this extension http://www.yiiframework.com/extension/yii-resque/ user@host:/path/to/protected$ ./yiic rresque start Yii command runner (based on Yii v1.1.13) Usage: ./yiic [parameters...] The following commands are…
arfname
  • 379
  • 1
  • 4
  • 10
1
vote
1 answer

config files to Generate Yii translation message files

i have an error using Yiic message to generate traduction: Error:the configuration file is not specified i have a config file /protected/messages/config.php
user2869049
  • 129
  • 1
  • 9
1
vote
2 answers

can I install wamp twice in different folders?

I'm facing a problem due to the folder name "Program Files" in which my wamp is installed. I'm using Yii Framework to create a web app. While running a command yiic webapp c:\Program Files\wamp\www\YiiApp it gives error due to the white space in the…
Akshay
  • 27
  • 7
1
vote
1 answer

How to read Output of Console Command in Yii?

I am trying to build some cron jobs to do backup some critical data on my Yii WebApplication I have built the the CConsoleCommand Class that needs to run. It runs fine and the command is executed However my job requires the application to parse the…
Manquer
  • 7,390
  • 8
  • 42
  • 69
0
votes
1 answer

Using yiic to update application via github

We have an application written in Yii 1.1, we maintain and control all aspects of the application and servers. It lives on a variety of servers. We maintain the code base locally through git and publish to our GitHub repo. When we roll out updates…
csteel
  • 373
  • 1
  • 6
  • 16
1
2