Yiic: Runtime And Assets Directories Are Not Created


I noticed the following issues:

  1. the demo web apps initially have neither "runtime" nor "assets" directories. This is causing errors. To fix it, one has to simply create the [webapp_root]/assets and the [webapp_root]/protected/runtime directory.

  2. The yiic command does not work initially over the command promt. It will throw the error "could not open input file". To fix this, one has to edit the yiic.bat file and change the line 22 from: "%PHP_COMMAND%" "%YII_PATH%yiic" %* to: "%PHP_COMMAND%" "%YII_PATH%yiic.php" %*

  3. Using the now working yiic and creating and running the webapp will throw the error: "Application runtime path "[path here]" is not valid. Please make sure it is a directory writable by the Web server process."

This can be fixed as well by simply creating those directories (see point 1).

Can anyone tell me, if this my personal setup or is this a standard bug in the distribution?



I seem to be having the same problem. Modifying the .bat file did not change the “could not open input file” problem, though I was able to get around it by specifying the absolute path to yiic.php in quotes when running the command in command prompt; but the generated app is missing the assets and runtime directories. I’m wondering if the two issues are related at all.