No Yii2 content on the remote server



  • In an attempt to launch any command through a console of yii2, it makes a mistake:

    Status: 500 Internal Server Error
    Content-type: text/html
    

    Exception 'yii\base\InvalidConfigException' with message 'Unable to determine the entry script file path.'

    in /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/base/Request.php:62

    Stack trace:
    #0 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/base/Component.php(130): yii\base\Request->getScriptFile()
    #1 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/console/controllers/HelpController.php(421): yii\base\Component->__get('scriptFile')
    #2 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/console/controllers/HelpController.php(241): yii\console\controllers\HelpController->getScriptName()
    #3 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/console/controllers/HelpController.php(67): yii\console\controllers\HelpController->getDefaultHelp()
    #4 [internal function]: yii\console\controllers\HelpController->actionIndex(NULL)
    #5 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
    #6 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
    #7 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('', Array)
    #8 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('', Array)
    #9 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/console/Application.php(167): yii\base\Module->runAction('', Array)
    #10 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/console/Application.php(143): yii\console\Application->runAction('', Array)
    #11 /hsphere/local/home/razzwan/razzwan.yii2/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
    #12 /hsphere/local/home/razzwan/razzwan.yii2/yii(18): yii\base\Application->run()
    #13 {main}

    I didn't change the meaning of silence. Where did this mistake come from and what to do with it? I'd like to work remotely through the console.

    (Added upon request by the respondent) $SERVER=

    array(34) {
    ["LC_PAPER"]=>
    string(11) "ru_UA.UTF-8"
    ["LC_ADDRESS"]=>
    string(11) "ru_UA.UTF-8"
    ["HOSTNAME"]=>
    string(15) ""
    ["LC_MONETARY"]=>
    string(11) "ru_UA.UTF-8"
    ["TERM"]=>
    string(5) "xterm"
    ["SHELL"]=>
    string(7) "/bin/sh"
    ["HISTSIZE"]=>
    string(4) "1000"
    ["SSH_CLIENT"]=>
    string(24) "
    ...*** ***** 22"
    ["LC_NUMERIC"]=>
    string(11) "ru_UA.UTF-8"
    ["SSH_TTY"]=>
    string(10) "/dev/pts/0"
    ["USER"]=>
    string(7) "user"
    ["LS_COLORS"]=>
    string(440) "no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:.cmd=00;32:.exe=00;32:.com=00;32:.btm=00;32:.bat=00;32:.sh=00;32:.csh=00;32:.tar=00;31:.tgz=00;31:.arj=00;31:.taz=00;31:.lzh=00;31:.zip=00;31:.z=00;31:.Z=00;31:.gz=00;31:.bz2=00;31:.bz=00;31:.tz=00;31:.rpm=00;31:.cpio=00;31:.jpg=00;35:.gif=00;35:.bmp=00;35:.xbm=00;35:.xpm=00;35:.png=00;35:.tif=00;35:"
    ["LC_TELEPHONE"]=>
    string(11) "ru_UA.UTF-8"
    ["MAIL"]=>
    string(23) "/var/spool/mail/user"
    ["PATH"]=>
    string(46) "/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin"
    ["LC_IDENTIFICATION"]=>
    string(11) "ru_UA.UTF-8"
    ["INPUTRC"]=>
    string(12) "/etc/inputrc"
    ["PWD"]=>
    string(40) "//local/home/user"
    ["LANG"]=>
    string(11) "en_US.UTF-8"
    ["LC_MEASUREMENT"]=>
    string(11) "ru_UA.UTF-8"
    ["SHLVL"]=>
    string(1) "1"
    ["HOME"]=>
    string(27) "/
    /local/home/user"
    ["LOGNAME"]=>
    string(7) "user"
    ["SSH_CONNECTION"]=>
    string(37) "******* 22"
    ["LESSOPEN"]=>
    string(24) "|/usr/bin/lesspipe.sh %s"
    ["LC_TIME"]=>
    string(11) "ru_UA.UTF-8"
    ["HISTTIMEFORMAT"]=>
    string(14) "[%d/%m/%y %T] "
    ["G_BROKEN_FILENAMES"]=>
    string(1) "1"
    ["LC_NAME"]=>
    string(11) "ru_UA.UTF-8"
    [""]=>
    string(5) "./yii"
    ["OLDPWD"]=>
    string(27) "/***/local/home/user"
    ["PHP_SELF"]=>
    string(0) ""
    ["REQUEST_TIME_FLOAT"]=>
    float(1448568934.9327)
    ["REQUEST_TIME"]=>
    int(1448568934)



  • Make sure you don't redesign. $_SERVER['SCRIPT_FILENAME']♪ If there's no reordering, it's the decision to determine this parameter in the launch file. yii before launch $application = new ConsoleApplication($config);:

    $_SERVER['SCRIPT_FILENAME'] = __DIR__ . '/yii';
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2