Yiic error - fix included!

Hello!

This will be my first post, so i thought i would contribute with something!

I wasn't able to locate this error by searching google so here it goes.

I'm using PHP5 on f-cgi (using lighty for that matter) which probably has to do with the error i'm going to teach you about,

and if someone else stumbles upon this error, hopefully can google it's way to this thread.

Execute

./framework/yiic webapp /my_folder/

would give me an freads() error. Dumping STDIN showed up nothing so to fix it add this snippet to the top of yiic or yiic.php:

defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

Suggestion / Feature request

I suggest adding this to the top of the files concerned of this problem:

defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

If i’m able to add this as a feature request i will do this in a few seconds after posting this…

/ Martin