How To Get Full Base Url (Http:// ?

I know it was asked before but the common answer doesn’t work for me



string(<img src='' class='bbc_emoticon' alt='8)' /> "http://."

How can I get "" ?

Update: I’m using it from a shell command.

It should work. It sounds like a misconfiguration of the server. Is it just in your local environment?

EDIT: I just saw your update. I’ll post an update to that shortly.


I’m not sure how SERVER variables are set when running a shell command, but in your console.php config file, you could force the correct host info by adding the following:







The getBaseUrl() method should work correctly then.

It works, thank you B)