php - Could not open input file: yii -


i'm working yii2 , trying init migration files. working few months ago, i'm getting following error

'yii' not recognized internal or external command

command i'm trying run 'yii migrate/create init_my_table

i've been looking around not sure problem is.

seems should pretty generic , easy fix error...

before delve proposing solution, check if installed yii's basic template or advanced template.

$ php yii serve

will work "basic" template.

make sure @ terminal, have changed "basic" directory, enter command:

 $ php yii serve 

output

server started on http://localhost:8080 document root "path/public_html/yiiproject/basic/web" quit server ctrl-c or command-c. 

if using advanced template, read thread , see if thread here helps. read till end: http://www.yiiframework.com/forum/index.php/topic/68728-php-yii-serve/

had same issue using advanced template.

php yii serve not open input file: yii

i tried command recommended. worked:

    $ php -s localhost:8000 

hope helps.

update advanced template

after installing composer , yii, open advanced template folder in cli , run command:

  $ php ./init 

this initialization process setup project , create necessary files.

set document root in apache /advanced/web/

more reading run project:

  1. http://www.yiiframework.com/wiki/799/yii2-app-advanced-on-single-domain-apache-nginx/

  2. http://www.yiiframework.com/doc-2.0/guide-start-installation.html


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -