yii php framework “Application runtime path is not valid.” exception

前端 未结 9 1044
旧巷少年郎
旧巷少年郎 2021-02-05 17:03

I tried to make a yii project for testing by executing

/var/www/html/yii/framework/yiic webapp demo

and when I go to localhost/demo I get en er

9条回答
  •  渐次进展
    2021-02-05 17:51

    Looks like you might have SELinux turned on, which enforces it's own security policies and can be a real pain for web apps and very annoying when it ends up resulting in errors like this. Whenever you have funky permissions problems, it's a good idea to check if you have it set: /usr/sbin/getenforce (or similar, depending on what system you are on).

    See: http://www.crypt.gen.nz/selinux/disable_selinux.html for a good overview and how to turn it off (again, the details may vary depending on your OS/kernel version). If it's a test machine not publicly accessible, you can pretty safely turn it off, otherwise, you should read the site above to understand what it does. Most Linux package managers can install files to help you manage the policies for specific apps. On RH/CentOS, you can also use /usr/bin/system-config-securitylevel-tui to turn it on/off.

提交回复
热议问题