Sorry Alex, I haven't noticed that whole thing in tools/cron.php
if (CMD_MODE) {
define('DBG_SKIP_REPORTING', 1);
$_SERVER['HTTP_USER_AGENT'] = 'gecko';
$_SERVER['HTTP_HOST'] = 'localhost';
}
Yes, we definitely need a task where to convert to using the Domain
variable.
Additional note, if we allow pass domain name from the arguments or
something like that. I am think ahead when you might have 1 cron
running for site with SiteDomains or something which may build all
URLs (your case) with the same Domain the URL?
DA.
On May 9, 6:12 am, Alexander Obuhovich <
aik.b...@gmail.com> wrote:
> We have code:
>
> *$_SERVER['HTTP_HOST'] = 'localhost'* in cron.php and that's why it's
> broken. This was done because accessing directly to $_SERVER['HTTP_HOST'] in
> php from command line we will get error.
>
> Nobody built links to the site from cron before and this problem was not
> discovered.
>
>
>
>
>
> On Sun, May 9, 2010 at 6:36 AM, Dmitry Andrejev <
dandre...@gmail.com> wrote:
> > Back to original bug.
>
> > I have checked on that BaseUrl and we are using SERVER_NAME constant
> > everywhere, but what's more strange is that Constant already setup to work
> > as needed. This is a code from the startup.php
>
> > safeDefine('SERVER_NAME', $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] :
> > $vars['Domain']);
>
> > Alex, what you think on this?
>
> > Also, I have attached PHPINFO ran from non-Apache php process.
>
> > DA.
>
> > On Tue, Apr 27, 2010 at 5:06 AM, Phil --
wbtc.fr -- <
p...@wbtc.fr> wrote:
>
> >> ok. the same type of code could be used for sitemap generation, isn't it?
>
> >> 2010/4/26 Alexander Obuhovich <
aik.b...@gmail.com>
>
> >>> Nope, it was site product XML export with all options and images to other
> >>> website.
>
> >>> On Mon, Apr 26, 2010 at 11:38 PM, Phil --
wbtc.fr -- <
p...@wbtc.fr>wrote:
>
> >>>> I agree, curl is the latest choice. I bet your question is related to
> >>>> sitemap generation, isn't it?
>
> >>>> 2010/4/26 Alexander Obuhovich <
aik.b...@gmail.com>
>
> >>>>> Also I were not using curl because it creates additional load on
> >>>>> webserver and nginx and apache could simply drop my connection resulting
> >>>>> empty page being saved.
>
> Best Regards,
>
> http://www.in-portal.comhttp://
www.alex-time.com