title: yii php framework "Application runtime path is not valid." exception
body: <p>I tried to make a yii project for testing by executing</p>
  
  <pre><code>/var/www/html/yii/framework/yiic webapp demo
  </code></pre>
  
  <p>and when I go to localhost/demo I get en error:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>At first I thought that it really isn't writable so I did:</p>
  
  <pre><code>chmod 777 /var/www/html/demo/protected/runtime
  </code></pre>
  
  <p>didn't work so as the last idea I executed:</p>
  
  <pre><code>chmod 777 -R /var/www/html/demo/
  </code></pre>
  
  <p>and I still get the same exception. Any ideas on what might be wrong?</p>
  
  <p>---EDIT---</p>
  
  <p>FFS this drives me nuts</p>
  
  <pre><code>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
  </code></pre>
  
  <p>and I still can't write files from within php script</p>