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)

a1deano 04-30-2012 09:47 AM

xpayments Cron help please
Hi all can anyone advise on setting up a cron job for xpayments, ive just had no luck with this, but not to sure if i am doing it correct.

I am setting up through cPanel and tried various lines and get errors -

/home/mysite/public_html/xcart/xpayments/cron.php: Permission denied

php /home/mysite/public_html/xcart/cron.php --key=xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Ive just tried this line -

php /home/mysite/public_html/xcart/xpayments/cron.php

I didn't get an error as such but got this by email -
Content-type: text/html

I am obviously missing something or not doing something correct
can anyone advise on this please


gb2world 04-30-2012 04:05 PM

Re: xpayments Cron help please
I don't think you need the key, unless something has changed on more recent versions. You may also need a full path for php. See: http://forum.x-cart.com/showthread.php?t=55339


a1deano 04-30-2012 04:40 PM

Re: xpayments Cron help please
Hi i did look at the thread before but couldn't work the issue from it, must be something simple but i can't work it out....

a1deano 05-05-2012 10:41 AM

Re: xpayments Cron help please
Just wondered if anyone is using xpayments and host with handson, would really appreciate help what to put in the cron job in cPanel

Also do i need to include anything in the cron.php in xpayments
also what permission...I just can't get this to work...please anyone simple reply thou :)

gb2world 05-05-2012 12:47 PM

Re: xpayments Cron help please
Are you certain that the cron is not executing?

Perhaps someone else can confirm - but if you set up the cron in cpanel, and you keep the option set to send you an email when the cron executes, you are going to receive an email that contains the output of the cron.

It has been a while since I set up X-payments - but I think the cron.php executes without an output.

So - when you get an empty email, I don't think that indicates that there has been an error, but is just telling you that the cron has completed execution. (Perhaps QT or others can confirm that xpayments cron runs without an output, so an empty email receipt indicates it executed normally.)

Another way for you to check that the cron is running: I think that when you log in to the X-Payments administration, if the cron has not run, it warns you.

If you are able to open X-Payments administration, and it is not warning you about any issues, that is a good sign. If you can execute a test payment from your shop where the connector is installed without any problems, that is another good sign that you have installed it correctly.


a1deano 05-05-2012 01:42 PM

Re: xpayments Cron help please
Hi yes i am receiving emails which vary as i try new things, i keep logging into xpayments but the cron warning still remains.
Below are some of the emails ive received.

Content-type: text/html

home/mysite/public_html/xpayments/cron.php: line 1: ?php: No such file or directory
/home/mysite/public_html/xpayments/cron.php: line 2: //: is a directory
/home/mysite/public_html/xpayments/cron.php: line 4: /Z: is a directory
/home/mysite/public_html/xpayments/cron.php: line 5: access-logs: command not found
/home/gezawear/public_html/xpayments/cron.php: line 6: access-logs: command not found
/home/gezawear/public_html/xpayments/cron.php: line 7: access-logs: command not found
/home/mysite/public_html/xpayments/cron.php: line 8: access-logs: command not found
/home/mysite/public_html/xpayments/cron.php: line 9: access-logs: command not found
/home/mysite/public_html/xpayments/cron.php: line 10: syntax error near unexpected token `newline'
/home/mysite/public_html/xpayments/cron.php: line 10: ` * @author Creative Development LLC <info@cdev.ru>'

/bin/sh: /public_html/xpayments/cron.php: No such file or directory

To be honist ive never set a cron job up and just can't work it out, couldn't find info in the manual either as what to put in cPanel for this....

a1deano 05-06-2012 01:24 AM

Re: xpayments Cron help please
On the the reply from hands on they gave this info -

php /home/gezawear/public_html/xcart/xpayments/cron.php

I put this into the cron job in cPanel and the email i received was this -

"Content-type: text/html"

But the warning still remains in xpayments, I have also set permissions to 755 hmmmmmmmm still not working..

gb2world 05-06-2012 09:50 PM

Re: xpayments Cron help please
You might have to try and get QT and Hands-on together to solve this. The email means you know that at least the cron.php started execution.

I reported the same issue to Hands-on last year - I asked them if there was a reference point of a successful implementation there that could be used as a basis of comparison. This was the situation last year - maybe they have a different answer now:

"I'm not aware of a running installation of X-Payments on our servers that I could look at for guidance, and none of the other techs I've spoken with have been able to get a copy running successfully."

I hacked up things to get the cron to run - but I am not confident that it is running correctly - so I would not want to offer any solution to you.

If you are able to use a shell and run the cron.php file, you will probably find that it executes correctly. Running the exact same command from the cron tab yields what you are reporting - I suspect it starts, but does not get to the end where it updates the x-payments database, so the warnings do not go away.

Since cron.php runs from the command line, but something seems off when run from a cron - there has to be some difference in the ownership, or something peculiar to how Hands-on server is set up. But since they do not have a successful implementation they can reference,it is hard to say what might be wrong. (I thought I was the only one with this issue.)

I don't think X-Payments software really fits in with the general statement that the recommended hosts are configured properly for X-Cart. I had many issues, some still unresolved, in the installation process.


hooter 05-07-2012 06:39 AM

Re: xpayments Cron help please
This problem arises because the xpayments cron.php expects to be run "implicitly" from the command-line. You need to adjust your cron command to use the php cli binary directly.

Here is an example cron that we have used that runs the xpayments cron without issue on at least a dozen CPANEL hosted client installations:

cd /home/username/public_html/xpayments;php-cli cron.php
Of course, change the above example folder path to suit your own installation.

gb2world 05-07-2012 10:27 AM

Re: xpayments Cron help please
Thanks, Hooter.

QT might want to add a note to the installation instructions about this.


All times are GMT -8. The time now is 05:38 AM.

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