You are here:  » Cron Job for Import failing

Support Forum



Cron Job for Import failing

Submitted by bat on Fri, 2011-07-29 14:12 in

I use cron jobs to import my feeds once a week and whilst one domain and its various PT installs and feeds are importing, my PT's on other domains aren't doing. I don't know what's going wrong. All the domains are on the same hosting company.

This is the error report I was emailed

--2011-07-29 15:00:01-- http://www.example.com/dvds/scripts/import_slow.php?filename=@ALL
Resolving www.example.co.uk...
Connecting to www.example.com|0.0.0.0|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.

Any ideas?

Submitted by support on Fri, 2011-07-29 14:22

Hi bat,

Unauthorised indicates that HTTP password protection has been configured on the /scripts/ folder for those installations. Could you try browsing manually to just

http://www.example.com/dvds/scripts/import_slow.php

I'm anticipating that you will see a username / password prompt; and normally this is something that would have been configured under directory password protection within your web hosting control panel.

If you do, and you know the username and password required for those folders, you can specify them directly in your CRON command, e.g. instead of

http://www.example.com/dvds/scripts/import_slow.php

...you can use:

http://username:password@www.example.com/dvds/scripts/import_slow.php

(that's the standard method of including HTTP authentication credentials within a URL)

If you're still not sure; if you could post 2 separate links, one to your working import_slow.php and one not working (i'll examplify before publishing your reply) and I'll take a further look...

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2011-07-29 14:32

Hi David
I tried what you said and its coming up with 401 Unauthorized. I checked to see if it's password protected directory but it doesn't appear to be and I don't know what the username and password would be

{link saved}

One that is working is {link saved}

Submitted by support on Fri, 2011-07-29 14:46

Hi Bat,

Although both installations are reporting version 12/10A, it looks like scripts/import_slow.php on the not working installation has been upgraded to the 12/10B version, which requires the admin password, if set, to be provided in the URL, so that should be all it is.

In place of;

http://www.example.com/dvds/scripts/import_slow.php?filename=@ALL

...use:

http://www.example.com/dvds/scripts/import_slow.php?password=adminpassword&filename=@ALL

...where adminpassword is your /admin/ password as configured in config.advanced.php....

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2011-07-29 16:57

Hi David
Thank you so much! Works a treat

Bat