我尝试通过执行命令来创建一个yii项目进行测试
/var/www/html/yii/framework/yiic webapp demo
当我访问localhost/demo时,会出现错误:
Application runtime path "/var/www/html/demo/protected/runtime" is not valid.
Please make sure it is a directory writable by the Web server process.
起初,我认为它确实是不可写的,因此我执行了以下操作:
chmod 777 /var/www/html/demo/protected/runtime
之前的方法都没有生效,最后一个想法是我执行了:
chmod 777 -R /var/www/html/demo/
我仍然遇到相同的异常。有什么想法可能出了问题吗?
---编辑---
这真让我抓狂。
drwxrwxrwx. 4 apache apache 4096 Jun 5 00:06 commands
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 components
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 config
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 controllers
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 data
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 extensions
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 messages
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 migrations
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 models
drwxrwxrwx. 3 apache apache 4096 Jun 5 00:06 runtime
drwxrwxrwx. 7 apache apache 4096 Jun 5 00:06 tests
drwxrwxrwx. 5 apache apache 4096 Jun 5 00:06 views
-rwxrwxrwx. 1 apache apache 71 Jun 5 00:02 yiic
-rwxrwxrwx. 1 apache apache 380 Jun 5 00:02 yiic.bat
-rwxrwxrwx. 1 apache apache 178 Jun 5 00:02 yiic.php
我仍然无法在 PHP 脚本中编写文件