What does this Yii error #8192 mean?

≯℡__Kan透↙ 提交于 2019-12-13 17:11:29

问题


I get this error on Heroku for a Yii2 app. I searched the source code and can't even find error 8192.

Error (#8192) An internal server error occurred.

Other pages work, but just this one page doesn't work. There is no error message in heroku logs. There is no runtime/logs/app.log file.


回答1:


It was because I was accessing a non-static class method statically. It worked in development. I had to turn on debugging in production (which was a big hassle by itself) to find out.




回答2:


What you should do is switch on debugging on your deployed server. This was an issue for me as Heroku gave me problems when I did not switch off debugging. However, I managed to switch it on in YII 2 by going into the web/index.php and setting the debug options as follows:

 defined('YII_DEBUG') or define('YII_DEBUG', true);
 defined('YII_ENV') or define('YII_ENV', 'production');

When I put the environment to production Heroku seemed to work. However, I did a lot of other stuff before getting to this point such as updating with composer and making sure all the required files are present. After doing this I could locate the function that was being called statically. Hope it helps!



来源:https://stackoverflow.com/questions/29290467/what-does-this-yii-error-8192-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!