Re: Getting app base URL even in a shell

2009-03-23 Thread mattalexx
Okay, "App" is reserved so I changed it to "MyApp". On Mar 23, 9:06 pm, mattalexx wrote: > Thank you for you suggestions. From Martin's suggestion, I thought I > would do this: > > app/config/app.php: > $config['App']['base_url'] = 'http://www.example.com'; > ?> > > app/config/bootstrap.php >

Re: Getting app base URL even in a shell

2009-03-23 Thread mattalexx
Thank you for you suggestions. From Martin's suggestion, I thought I would do this: app/config/app.php: http://www.example.com'; ?> app/config/bootstrap.php app/vendors/shells/cron.php On Mar 23, 10:09 am, Martin Westin wrote: > You need two things: Servername and path to the application ro

Re: Getting app base URL even in a shell

2009-03-23 Thread Martin Westin
You need two things: Servername and path to the application root. Problem is those things are governed by Apache and Cake's shell cant really figure out which vhost you "want" by itself. At least I never got it. What I did was to add a parameter to the shell call where I provide the hostname I wa

Re: Getting app base URL even in a shell

2009-03-22 Thread brian
OK, I think I misunderstood you. In any case, you should have access to the constants WWW_ROOT, WEBROOT_DIR, etc. Have a look at ShellDispatcher class, for instance. But I have no experience with an app dir in a subdirectory of a site. On Sun, Mar 22, 2009 at 9:22 PM, mattalexx wrote: > > Thank

Re: Getting app base URL even in a shell

2009-03-22 Thread mattalexx
Thank you for your response. On Mar 22, 7:04 pm, brian wrote: > On Sun, Mar 22, 2009 at 7:14 PM, mattalexx wrote: > > > Hello, > > > I am trying to find a function or constant that will reliably give me > > the app's base URL, even when I'm in a shell and there's no HTTP being > > spoken and th

Re: Getting app base URL even in a shell

2009-03-22 Thread mattalexx
I'm sending e-mails to users. These e-mails contain links to the app. On Mar 22, 7:04 pm, brian wrote: > On Sun, Mar 22, 2009 at 7:14 PM, mattalexx wrote: > > > Hello, > > > I am trying to find a function or constant that will reliably give me > > the app's base URL, even when I'm in a shell an

Re: Getting app base URL even in a shell

2009-03-22 Thread brian
On Sun, Mar 22, 2009 at 7:14 PM, mattalexx wrote: > > Hello, > > I am trying to find a function or constant that will reliably give me > the app's base URL, even when I'm in a shell and there's no HTTP being > spoken and therefore there's a limited $_SERVER var. > > Am I going to have to write my