to my understanding (and experience) a batch (or task) cannot guess
which domain name/ip you are using for your app. The only solution I
can see is to define it in your app.yml

On Nov 12, 7:58 am, Amadeus <[EMAIL PROTECTED]> wrote:
> Whenever I call genUrl from a task I get the url prefixed with './
> symfony'. Setting absolute to true/false does not make a difference.
>
> I have tried doing this:
>
> $_SERVER['HTTP_X_FORWARDED_HOST'] = 'myhost';
> sfConfig::set('sf_no_script_name',true);
> sfConfig::set('sf_relative_url_root','');
> echo sfContext::getInstance()->getController()->genUrl('module/
> action',true);
>
> and
>
> echo 'http://myhost'.sfContext::getInstance()->getController()->genUrl
> ('module/action',false);
>
> none of which work.  So I modified the controller to strip out the './
> symfony' prefix and add my own but I wish there was an easier way to
> set the desired hostname/prefix.
>
> I have tried calling setRelativeUrlRoot but it does not seem to take
> effect until after my url is generated for whatever reason.  I call it
> in my task:
>
> sfContext::createInstance($this->configuration)->getRequest()-
>
> >setRelativeUrlRoot('XXXXXXXX');
>
> But I still get './symfony' instead.
>
> Any suggestions?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to