It’s a console application trying to access a server variable.
Which is not going to exist.
That is: SERVER_NAME is not set.
Because you are using createUrl.
<edit>
Hold on: Are you trying to generate absolute URLs?
If you are, you cannot use http request servername, you need to store that in your configuration from the web app and retrieve it from your console app.
I had the same problem when trying to create absolute URLs for my emails as a shell command.
I am not sure if you can use createUrl at all, to be honest.
Relative or not.
In the console, there’s no such thing as an url. Practically speaking.
I am using that item, and append to it what the application should generate based on my rules(the relative url).
Even if it is a Console App, i can generate the urls for the other pages (you will notice that i am generating a sitemap in this case) but it seems like the only one that isn’t working is the forum, which is on a “sub-domain”.
Also, i have another console app, used for sending newsletter with all kind of links from the website. All those links are parsed okay with Yii::app()->urlManager->createUrl()
There should be an extra check there to see if SERVER_NAME is set or not in the $_SERVER $var and take the correct action in each of the cases.
Don’t really know, but this looks very much like a bug