You are here:  » Running cron.php with the new automation tool failing

Support Forum



Running cron.php with the new automation tool failing

Submitted by ka on Wed, 2011-08-03 22:10 in

Hi David, I have just installed PT and im trying to run cron.php via the command line.

I seam to be able to import some of the products from the first catalog though I get the error message below:

fetching AliExpress_by_Alibaba_com-Aliexpress_com_product_catalog.txt
fetching AliExpress_by_Alibaba_com-Aliexpress_com_product_catalog.txt...[ERROR - TRANSFER FAILED]

fetching DollarDays-Dollar_Days_Prpduct_Catalog.txt
fetching DollarDays-Dollar_Days_Prpduct_Catalog.txt...[ERROR - TRANSFER FAILED]

Any clever ideas?

Br

//Kimi

Submitted by support on Thu, 2011-08-04 08:19

Hi Kimi,

TRANSFER FAILED indicates the php or curl fetch operation was not successful, so the job aborted before any attempt to unzip (if configured).

Are they only failing via cron.php, or do the jobs succeed when being run manually from the Automation Tool?

If they are not running successfully at all, the first thing to try would be to switch to the curl handler. To do this, edit your config.advanced.php, and change line 43 to:

  $config_automationHandler = "curl";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by ka on Thu, 2011-08-04 09:01

Hi David

Thanks for the suggestion but it looks like there is a timout limit within the cron job that makes the process fail.

Im now aiming on runing the slow import via cron and i would guess that it could look something like:
/web/cgi-bin/php5 "$HOME/html/scripts/import_slow.php @ALL"

Though if i would like to automate the unzipping of the feeds together with the slow import, what would i need to change?

Br

//Kimi

Submitted by ka on Thu, 2011-08-04 09:21

Well, that did not work:

Status: 404 Not Found
Content-type: text/html

No input file specified.

?

//Kimi

Submitted by support on Thu, 2011-08-04 09:29

Hi Kimi,

scripts/import.slow requires an HTTP invocation, normally using wget (but CURL is also an option); please try:

/usr/bin/wget --max-redirect=9999 "http://www.yoursite.com/scripts/import_slow.php?filename=@ALL"

To double-check that /usr/bin/wget is correct for your server, check Support Info (Admin menu) and your should see the same at the start of the Option 2 command in the CRON section...

Hope this helps,

Cheers,
David.
--
PriceTapestry.com

Submitted by ka on Thu, 2011-08-04 09:55

Thanks David.

I get this when running the abow line im the command line:

connected.
HTTP request sent, awaiting response... 403 Forbidden
2011-08-04 02:50:02 ERROR 403: Forbidden.

Do i need to set the rights to 777 for the script folder?

BR

//Kimi

Submitted by support on Thu, 2011-08-04 10:10

Hi Kimi,

755 should be sufficient...

Cheers,
David.
--
PriceTapestry.com

Submitted by ka on Thu, 2011-08-04 10:33

Hi David.

I'm Still getting forbidden.
Im starting to wonder if there is a old .htaccess file somewhere though this should not be the case.

Could you point me in right direction regarding CURL?

Br

//Kimi

Submitted by support on Thu, 2011-08-04 10:39

Hi Kimi,

I received your email I'll follow up to that with more options;

Cheers,
David.
--
PriceTapestry.com