问题
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