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

前端 未结 9 1042
旧巷少年郎
旧巷少年郎 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:36

    That should work... so maybe also try setting your Apache user (usually 'www-data') as the owner of /runtime? Something like:

     chown -R www-data:www-data /var/www/html/demo/protected/runtime
    

    Could be an Apache umask issue also. Check out the Yii forum, which has helpful posts like this one: http://www.yiiframework.com/forum/index.php?/topic/19400-question-about-directoryfile-permissions/

    You should NOT have to set your whole project to 777, that is very insecure. I think /assets and /protected/runtime are the only directories that need write permissions (775).

提交回复
热议问题