X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   X-Payments issues & questions (https://forum.x-cart.com/forumdisplay.php?f=50)
-   -   xpayments Cron help please (https://forum.x-cart.com/showthread.php?t=63478)

laplante 08-07-2012 08:38 AM

Re: xpayments Cron help please
 
Hi,
I receive the error code 212 when I launch the cron.php from command line.
Could you let me know what that means, please.
I am using Version: 1.0.5

ambal 08-07-2012 11:19 PM

Re: xpayments Cron help please
 
Make sure you run it using CLI version of PHP. See http://help.x-cart.com/index.php?title=X-Payments:Installation#cron.php:_X-Payments_is_using_a_non-secure_protocol_error

laplante 08-08-2012 12:39 AM

Re: xpayments Cron help please
 
Hi,
I am using the CLI version. It only runs when I am root user but not when I am the web-user.
Do you know what the error code means?

ambal 08-08-2012 05:07 AM

Re: xpayments Cron help please
 
Have no idea. Your case needs investigation on your server that can be done within bounds of our incident support for X-Payments

gblair 09-21-2012 01:33 PM

Re: xpayments Cron help please
 
I've managed to get the cron.jpb to run under blue host, using:
/ramdisk/bin/php5-cli /home1/domain/public_html/xpayments/cron.php

But it (unexpectedly) generates errors. Are we really expected to understand all this stuff and how to fix it?

Error is -
PHP Warning: require_once(./top.inc.php): failed to open stream: No such file or directory in /home1/domain/public_html/xpayments/cron.php on line 23
PHP Fatal error: require_once(): Failed opening required './top.inc.php' (include_path='.:/usr/php/53/usr/lib64:/usr/php/53/usr/share/pear') in /home1/domain/public_html/xpayments/cron.php on line 23

From what I can see both folders exist. I just don't know how to fix it.

big sigh

mcanitano 09-21-2012 03:27 PM

Re: xpayments Cron help please
 
This is what we used on our cPanel:

Code:

php -f  /home/username/public_html/xcart-directory/xpayments/cron.php

gb2world 09-21-2012 05:01 PM

Re: xpayments Cron help please
 
Look at the command sent to the cron in post #9: http://forum.x-cart.com/showpost.php?p=338849&postcount=9

You can try to do something similar using the paths at your host - you can see one part of the command before the semicolon - the cd is moving to the directory where the x-payments cron is. Then the next part runs the cron after moving to the directory. That ensures it finds the included files referenced in the script.

---

kevinrm 02-21-2013 01:44 AM

Re: xpayments Cron help please
 
You have to know exactly where PHP CLI is located or it won't work. Exactly, and they're not all the same.

1) Find out where your PHP CLI is. SSH into your root. If you don't have root access, you'll have to get your hosting company to do it. Once you ssh into root, run this command:

whereis php5

For my server, this was the result:

/usr/bin/php5

Knowing this is everything.

2) Run PHP scripts from Linux command line in this manner:

/user/bin/php5 /path/to/your/script.php

For me that would equate to:

/usr/bin/php5 /home/mypath/public_html/xpayments/cron.php

3) Following X-Cart instruction manual, cron is this:

0 0 * * * cd /home/mypath/public_html/xpayments ; /usr/bin/php5 -f /home/mypath/public_html/xpayments/cron.php

See the ";" between the statements? The first part tells the cron to change directories to where the file is located. The second command instructs it to run that file from the PHP CLI mode.

Took me forever to figure that out!

ambal 02-21-2013 01:47 AM

Re: xpayments Cron help please
 
> You have to know exactly where PHP CLI is located or it won't work. Exactly, and
> they're not all the same.

This is true when you are using a "download-able" X-Payments license.
X-Payments Hosted plans do know where it is located so nothing is needed to be done about PHP CLI setup.


All times are GMT -8. The time now is 07:57 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.