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 Thanks |
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
--- |
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....
|
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 :) |
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. --- |
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.... |
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.. |
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. --- |
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: Code:
cd /home/username/public_html/xpayments;php-cli cron.php |
Re: xpayments Cron help please
Thanks, Hooter.
QT might want to add a note to the installation instructions about this. --- |
Re: xpayments Cron help please
I just tried that but the email i received was -
/bin/sh: php-cli: command not found I changed the username as needed, I have contacted qt but waiting for them to get back due to the holiday... |
Re: xpayments Cron help please
I just removed the cd from the above command but received this
/bin/sh: /home/mysite/public_html/xpayments: is a directory /bin/sh: php-cli: command not found |
Re: xpayments Cron help please
Now - Hands-on should be able to help you if you need the path to php-cli.
You can try php-cli /home/gezawear/public_html/xcart/xpayments/cron.php If that does not work - I think Hands-On can help you get the paths straight. --- |
Re: xpayments Cron help please
Ive just had a new separate server setup for xpayments, ive been trying to setup a cron job, everything i tried didn't work kept getting emails of various descriptions.
My last cron command in Cpanel was - php -q /home/mysite/public_html/xpayments/cron.php I am not receiving any emails now so don't know whether this is a good or bad thing, but ive checked in xpayments backend and i still see this error The cron.php script execution error The cron.php script was launched more than 24 hours ago. It is recommended to run cron.php once every 24 hours, otherwise the PCI DSS requirements for protecting cardholder data might not be met. Please check the cron.php launch settings. Can anyone advise please Many thanks Dean |
Re: xpayments Cron help please
Use php-cli instead of php in your command line. If php-cli is not found, you have to ask your host for the path to it.
--- |
Re: xpayments Cron help please
Hi thanks for your help i change the code to -
php-cli /home/mysite/public_html/xpayments/cron.php but got this email back - /bin/sh: php-cli: command not found So presume i have part of the path missing, ive dropped a note to Handson see if they can advise... Many thanks again |
Re: xpayments Cron help please
Handson have just emailed me back and said -
We have added php-cli to your path and it is now available to your user account But not sure what i have to do now, wish x-cart guys would have written an easy install for this... Do i need to do something in Cpanel now or add something extra to this line - php-cli /home/mysite/public_html/xpayments/cron.php |
Re: xpayments Cron help please
Use the command line posted here and you'll be good to go:
http://forum.x-cart.com/showpost.php?p=338849&postcount=9 |
Re: xpayments Cron help please
Hi hooter thanks for your help, Handson sorted the issue out for me, as usual top work from them...this is what the wrote -
There was an error in the script when executed manually: PHP Fatal error: require_once(): Failed opening required './top.inc.php' (include_path='.:/usr/local/php53/pear') in /home/mysite/public_html/xpayments/cron.php on line 23 Fatal error: require_once(): Failed opening required './top.inc.php' (include_path='.:/usr/local/php53/pear') in /home/mysite/public_html/xpayments/cron.php on line 23 So I created a php.ini file inside of the xpayments directory with the following include_path="/home/mysite/public_html/xpayments/" And the script is now executing without error, this is really something that the module developers should include in their documentation ans the required includes are stored directly in the same folder and php did not know to look there by default until specified in the php.ini file. Hope this will help someone else out as its been a major headache trying to sort this, many thanks to all for your help... |
Re: xpayments Cron help please
Have you tried command like this:
Quote:
|
Re: xpayments Cron help please
Looks like what my host done didn't fix the problem same email again....Alex i tried what you said above and the email i received was this -
X-Powered-By: PHP/5.3.10 Content-type: text/html But this error is still present in back end of xpayments The cron.php script execution error The cron.php script was launched more than 24 hours ago. It is recommended to run cron.php once every 24 hours, otherwise the PCI DSS requirements for protecting cardholder data might not be met. Please check the cron.php launch settings. Just at a total loss on this one, Alex i could do with some help with this please.....Thanks |
Re: xpayments Cron help please
Have you tried what Hooter told you in post #9? Alex's suggestion uses php instead of php-cli, which we have already established, does not work for you.
I have the cron running on a VPS at Hands on. I don't use the path in the cron tab, as Hooter recommend, but I think it should work. Instead, I changed the path to the include file in the cron.php script to have a full path instead of a relative path. The people at Hands-on should be able to sort this for you now - they told you it executes without error. --- |
Re: xpayments Cron help please
Hi thanks yes i did try what hooter put
Handson created a php.ini file inside of the xpayments directory with the following include_path="/home/mysite/public_html/xpayments/" They also said - we added php-cli to your path and it is now available to your user account When i use hooters code i get this email - X-Powered-By: PHP/5.3.10 Content-type: text/html but the error message in xpayments back end is still there.. Thanks |
Re: xpayments Cron help please
Hi well problem still exists Handson having been working hard trying to sort this for me, the latest thing was -
Hi Dean, We have modified the permissions on the shell script, as well as hard coded the location of php-cli into the script. But still the error in back end remains They also tried this - I have setup a shell script with the following inside, cd /home/gezcheck/public_html/xpayments; php-cli cron.php and set it to execute via crontab. this method does work without an issue from the cli as your user, so it shouldnt have a problem executing as a cron. after 24hours the error came back.....QT any help on this please Handson setup this command on the cron - sh /home/mysite/cron.sh Many thanks |
Re: xpayments Cron help please
If I understand you correctly you setup shell script per #20. Am I right? Please provide me with the exact error message you get on the cron job.
|
Re: xpayments Cron help please
If it helps - you can have the engineer at Hands-On contact me and I can let them know where I have an x-payments cron running which they can use as a basis for comparison.
I could be wrong - but I seem to remember that if you modify or add files to X-Payments, that there is a procedure within X-Payments that detects the change, and you have to approve it. If true - then when the Hands-on engineer changes files in X-Payments, you have to make sure you go back into X-Payments and allow the changed files to take effect. Maybe this is part of the problem? --- |
Re: xpayments Cron help please
Quote:
I receive email with this - /bin/sh: php-cli: command not found Hi gb2world yes you do get an allow change link in xpayments back end if you modify something i got this when doing the checkout page, but don't receive anything else so presume everything is ok...i will forward your message onto Handson asking them to contact you.....thanks for your help... Handson emailed me this - Hi Dean, With the 1H systems we use here, we have multiple different PHP versions available. Checking out the threads at X-cart.com directly, I see PHP 5.3 should be specifically used. I have changed the cronjob to: cd /home/mysite/public_html/xpayments;/usr/local/php53/bin/php-cli cron.php At the moment I am not receiving any error outputs from this. I did change it to 5 minutes and it ran several times without producing errors, so I've set it back to once per day. The status code when exiting from this command is 110 though, and we would normally see a status 0 for a successful execution of any PHP script. This 110 code is present from even the root level with PHP and php-cli, so this doesn't seem like a specific account related issue. You may want to double check your config.php settings also. Please let us know how this goes. ------ I am not receiving any error emails but the error remains in xpayments back end. I presume if there was a problem with config.ini.php then i would be having more problems than just the error in the backend.. Thanks Dean |
Re: xpayments Cron help please
Quote:
OK, I see. The issue was due to incorrect php-cli reference in the cron job command. The command itself (#20) works. So, as far as I understand, the cron job works fine at the moment. Thus, could you please clarify what exactly the error appears in the XP admin back-end. |
Re: xpayments Cron help please
Hi Alex
Thanks for your help the error message in xpayments backend is - The cron.php script execution error The cron.php script was launched more than 24 hours ago. It is recommended to run cron.php once every 24 hours, otherwise the PCI DSS requirements for protecting cardholder data might not be met. Please check the cron.php launch settings. The code handon have put in the cron is - cd /home/mysite/public_html/xpayments;/usr/local/php53/bin/php-cli cron.php Thanks Dean |
Re: xpayments Cron help please
Please check the "<xp_dir>/var/log/cron/DATE/errors.xxxx.log" file. Do you see any errors around the cron.php launch time there?
|
Re: xpayments Cron help please
Dean, I see you have technical support ticket in your HelpDesk at https://secure.qtmsoft.com
It was closed due to no reply from you. I suggest you to continue that ticket as it may happen we will need access to your server to fix the configuration issue. Public forum is not a good place for giving access to your server. |
Re: xpayments Cron help please
Hi Ambel
Ive sent you a PM ive also opened another ticket with your support Thanks Dean |
Re: xpayments Cron help please
Yeeeeeeeee finally fixed thanks to everyone who tried to help with this issue has been such a headache, QT went in and fixed the problem for me, there message was -
Dear Dean, Thank you for the access information provided. We've fixed the cron-related issues in your X-Payments installation, the folowing files were updated: - <xpay-dir>/top.inc.php - <xpay-dir>/lib/XPay/Controller/Cron/Main.php - <xpay-dir>/lib/XPay/Model/Payment.php And added the following cron task: cd /home/mysite/public_html/xpayments/; /usr/local/php53/bin/php-cli cron.php Thanks again to everyone who tried to help. Thanks to QT for sorting this for me. |
Re: xpayments Cron help please
So is this a bug in X-Payments or something specific to your hosting environment? Since they had to modify X-Payments files....
|
Re: xpayments Cron help please
Hi,
I've Just put this command "cd /home/mysite/public_html/xpayments/; /usr/local/php53/bin/php-cli cron.php" without any modification inside a x-payment files and works like a charm. Thanks Lucas |
Re: xpayments Cron help please
Steve, that was hosting-related
|
Re: xpayments Cron help please
Okay I have read this article as well as various other articles online and I cannot get my x-payments cron.php to work!
I am using bluehost hosting with cpanel with PHP 5.3. I have tried dozens of different cron lines and still cant get that error message in x-payments to go away! Bluehost support has recommended this cron line and it is still not working /ramdisk/php/53/bin/php5-cli -c ~/public_html/php.ini /home3/hitecimp/public_html/xp/cron.php |
Re: xpayments Cron help please
Hi Steve sorry only just sore your question I don't know if this was a bug or something to do with my hosting, QT went in and sorted it for me but they didn't say if it was a bug or not....
|
Re: xpayments Cron help please
Alex said it was hosting related issue
|
Re: xpayments Cron help please
Can anyone give me a hand here. Anyone hosting x payments with blue host?
|
All times are GMT -8. The time now is 09:14 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.