Home  >  Article  >  PHP Framework  >  What to do if a 500 error occurs in yii2.0

What to do if a 500 error occurs in yii2.0

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-12-09 09:33:012845browse

What to do if a 500 error occurs in yii2.0

1. First open web/index.php defined('YII_DEBUG') or define('YII_DEBUG', true); and change this to true; look at the error message:

Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'The directory is not 
writable by  the Web process: /home/wwwroot/1XX.2X.XX3.X2/xhedu/backend/web/assets'
in /home/wwwroot/12X.2X.XXX.1X/xhedu/vendor/yiisoft/yii2/web/AssetManager.php:213

2. The assets folder and its file permissions are insufficient, resulting in the inability to access AssetManager.php. Just change it to 777. The name of the owner and group of my previous project is www, and the permissions are the largest. 777; The user name of subsequent projects is root, and the permissions are not the highest. Therefore, you need to change the project assets folder to 777, and it will be fine.

PHP Chinese website has a large number of free Yii introductory tutorials, everyone is welcome to learn!

The above is the detailed content of What to do if a 500 error occurs in yii2.0. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn