Closed angelcoding closed 11 years ago
Actually, possibly not an issue after all! I forced the cron to use cli rather than cgi and that has obviously solved things. Not quite sure how you would cater for both in code anyway, so will close this as a non-issue.
Just wanted to point out that Yiinitializr doesn't handle non 'cli' console connections very well. There are a couple of places in the code that check for the existence of 'cli' as the Server API (I'm also including the Yiinitializr-advanced EActiveRecord in that count too) e.g....
But I had problems when creating a cron job on my own server because the php_sapi_name() is actually 'cgi-fcgi' when run as a cron job (I believe there are other possibilities too).
Looks like they might have had a similar issue in the Yii core - CConsoleApplication Line 78
Note: the php_sapi_name() part was commented out.
It would be useful if Yiinitializr can be modified in a similar way to allow the use of other SAPI names in the console.
Thanks, Steve