I have updated my application server on centos 7.x with php 7.3.x which gives following error when i run console command like
/usr/local/zend/bin/php /var/www/html/cfms-hc/yii
Following is stack log.
Exception 'yii\base\UnknownMethodException' with message 'Calling unknown method: yii\console\Request::getHeaders()' in /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Component.php:300 Stack trace: #0 /usr/local/zend/var/plugins/yii2/zray/zray.php(158): yii\base\Component->__call('getHeaders', Array) #1 /usr/local/zend/var/plugins/yii2/zray/zray.php(43): Yii2->getInfo() #2 /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Controller.php(157): Yii2->getPageInfo(Array, Array) #3 /var/www/html/cfms-hc/vendor/yiisoft/yii2/console/Controller.php(164): yii\base\Controller->runAction('', Array) #4 /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array) #5 /var/www/html/cfms-hc/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('', Array) #6 /var/www/html/cfms-hc/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('', Array) #7 /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request)) #8 /var/www/html/cfms-hc/yii(20): yii\base\Application->run() #9 {main} Exception 'yii\base\UnknownMethodException' with message 'Calling unknown method: yii\console\Request::getHeaders()' in /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Component.php:300 Stack trace: #0 /usr/local/zend/var/plugins/yii2/zray/zray.php(158): yii\base\Component->__call('getHeaders', Array) #1 /usr/local/zend/var/plugins/yii2/zray/zray.php(43): Yii2->getInfo() #2 /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Controller.php(157): Yii2->getPageInfo(Array, Array) #3 /var/www/html/cfms-hc/vendor/yiisoft/yii2/console/Controller.php(164): yii\base\Controller->runAction('', Array) #4 /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array) #5 /var/www/html/cfms-hc/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('', Array) #6 /var/www/html/cfms-hc/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('', Array) #7 /var/www/html/cfms-hc/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request)) #8 /var/www/html/cfms-hc/yii(20): yii\base\Application->run() #9 {main}`enter code here`
I can not understand where to look and what can be the problem. Plz guide anyone.
advanced-app
? can you add yourcommon/config.php
andconsole/config.php
– Muhammad Omer Aslamzray
assumes to be executed via HTTP request, not CLI command. I would suggest replacing zray (which is a component from Zend Framework) with Yii2 debugger bar - github.com/yiisoft/yii2-debug. – lubosdzzray
was enabled there. I have disabled and problem is resolved. – Waseem Hassan