webgyrl Posted September 15, 2005 Posted September 15, 2005 (edited) Hey gang, Hoping someone can help me out! Back in March I installed the aMember script on one of my domains. I had a tough time setting up the CRON job as most of the code lines provided to me by aMember didn't work. Finally I got the right line wich was: curl -s http://your-TCH-domain.com/amember/cron.php The other day I started to get messages from the server saying: /bin/sh: line 1: /usr/bin/curl: Permission denied I put in a trouble ticket and was told that CURL was disabled on the shared servers for security. The tech assistant kindly reconfigured the cron job to work with php. This morning I got another email from the server stating: Cannot create license: unknown TLD for domain: i I will be honest, I haven't the slightest idea how to make this work. I emailed Alex over at CGI Central (the author of the scripts) and he told me that it was my host that blocked access to curl and that I should forward the error message that I got to host support and ask to fix that error. Now of course it turns out Curl is disabled now, so I have no idea how to fix this problem. Any ideas? Thanks so much PS: just for reference, the following are the lines that are suggested in the aMember manual.... none of them worked upon initial install of the script. /usr/bin/curl -s http://yoursite.com/amember/cron.php'>http://yoursite.com/amember/cron.php'>http://yoursite.com/amember/cron.php'>http://yoursite.com/amember/cron.php'>http://yoursite.com/amember/cron.php /usr/bin/wget -o/dev/null -O- http://yoursite.com/amember/cron.php /usr/local/bin/lynx -source http://yoursite.com/amember/cron.php /usr/local/bin/curl -s http://yoursite.com/amember/cron.php /usr/local/bin/wget -o/dev/null -O- http://yoursite.com/amember/cron.php Edited April 6, 2006 by TCH-Bruce Quote
TweezerMan Posted September 15, 2005 Posted September 15, 2005 I was not aware that curl had been disabled, but it's not surprising, considering that it is in the same class of commands as lynx, GET, and wget. None of the example commands you have listed will work on TCH servers, as all of those commands have been disabled. I emailed Alex over at CGI Central (the author of the scripts) and he told me that it was my host that blocked access to curl and that I should forward the error message that I got to host support and ask to fix that error. It is true that TCH made a conscious decision to remove access to curl, lynx, GET, and wget. I don't see that decision being changed any time soon. Fixing your script to run in an environment where those tools are not available falls under the category of '3rd party script support' though, and it is not something that the TCH Help Desk really can help with. Your script needs to be modified to run so it does not depend on these commands. Usually, it does not take a lot modification to make scripts such as yours work, but what exactly would be required depends on the exact code that is in your script. You may want to look at prior forum topics on this issue. Quote
MikeJ Posted September 15, 2005 Posted September 15, 2005 Command line curl was indeed disabled because it was being abused by vulnerable scripts just like the other command line programs were. A simple way to continue to use your cron.php file the way it's currently configured (the trial amember has cron.php encoded so I can't even see if it could be modified to work from a command line) is to use php to call the php page. Create a file in your account called something like "runcron.php": >#!/usr/local/bin/php <?php include('http://indiemanagers.com/amember/cron.php'); ?> Make sure the file is executable (permissions 755). Then change your cron job to run "/home/youraccount/runcron.php > /dev/null" (if it's in your top directory, for example). This will give you the same net effect as what you were doing before. We understand it's a little more of a pain to setup, but it's much less exploitable by random scripts searching for vulnerable websites. Quote
webgyrl Posted September 16, 2005 Author Posted September 16, 2005 David and Mike Thanks so much for your suggestions. I emailed Alex over at CGI Central and he told me he set cron to be executed from his server. I am waiting to see if the cron is executed without an error, but I won't know until midnight tonight if it does indeed work. I am going to save all your info in case the cron fails and I have to do one of these alternatives. Very thankful for your suggestions and help! I was freaking out a bit when this all went down.... Thanks guys! Quote
willp Posted September 16, 2005 Posted September 16, 2005 So what does one do when their shopping cart uses curl to connect to the merchant to process credit cards? Especially when it was suddenly disabled without warning effectively shutting down said store and cutting off revenue. I can't reprogram the cart, and I can't very easily change merchant accounts especially when I'm satisfied with the one I have now. Quote
TCH-Rob Posted September 17, 2005 Posted September 17, 2005 So what does one do when their shopping cart uses curl to connect to the merchant to process credit cards? Especially when it was suddenly disabled without warning effectively shutting down said store and cutting off revenue. I can't reprogram the cart, and I can't very easily change merchant accounts especially when I'm satisfied with the one I have now. <{POST_SNAPBACK}> Command line curl was indeed disabled As far as I know, this should have no effect on shopping cart programs. It has been a while since I used one with a merchant account but I believe they use CURL in a different manner. Quote
willp Posted September 17, 2005 Posted September 17, 2005 Well it does affect this shopping cart's ability to talk to PayPal. Here is the error: >Script Execution Error The following error was returned: There was a problem retrieving a response from the cURL executable. The executable was found, however it does not appear to be working properly. It knows the file is there, but doesn't know it isn't working because it was disabled. I've been a very happy TCH client, but this has to work. The website/store is for a non-profit railroad museum. The museum is currently running a deficit budget, so any revenue loss is . Quote
TCH-Don Posted September 17, 2005 Posted September 17, 2005 I would open a help desk ticket to the techs and give them the error message. Quote
willp Posted September 17, 2005 Posted September 17, 2005 I would open a help desk ticket to the techs and give them the error message. <{POST_SNAPBACK}> I did and was told it has been disabled for security reasons. However, I just went to my store and saw that an order went through about three hours ago. I tried it myself and it's working now! I hope I get some advance notice if it will be turned off again. Was thinking about how to get around this since TCH didn't want to budge on turning cURL back on. I can set the store up for offline processing. It will collect and encrypt the credit card numbers (instead of just passing them along) and I'll type everything into the virtual terminal to charge the card. Tedious for sure, but a lot better than loosing orders because of script errors. Quote
TCH-Don Posted September 17, 2005 Posted September 17, 2005 As mentioned only the command line curl is off curl itself is still on and working. Quote
willp Posted September 17, 2005 Posted September 17, 2005 Well command line should have no effect on me, as I doubt that's how my cart calls for it. The entire thing was disabled on my server. I am very happy it works now and have calmed to the point where I can again say Quote
webgyrl Posted September 18, 2005 Author Posted September 18, 2005 TCH does rawk... but it would have been nice to know that curl was going to be disabled ahead of time. Quote
TCH-Rob Posted September 18, 2005 Posted September 18, 2005 TCH does rawk... but it would have been nice to know that curl was going to be disabled ahead of time. Unfortunately there are times that this is not an option. If the issue is severe enough, we have to take it down right away. Obviously, we do not want to have to do that so we can give as much notice as possible, but in this case there was little choice. Quote
webgyrl Posted September 20, 2005 Author Posted September 20, 2005 Unfortunately there are times that this is not an option. If the issue is severe enough, we have to take it down right away. Obviously, we do not want to have to do that so we can give as much notice as possible, but in this case there was little choice. Hey Rob, No worries. Sometimes you have to act fast to protect your clients and that was the case this time. I appreciate you looking out for us and protecting us from vulnerabilities. The cool thing is that we can just come over here and ask questions and tech support is always really fast. You are appreciated! Quote
willp Posted January 19, 2006 Posted January 19, 2006 And it appears cURL is down on my server again... Quote
Head Guru Posted January 19, 2006 Posted January 19, 2006 Curl can not go down. If curl is down PHP is down as CURL is a component of PHP. So basicly if CURL is down, then php is down and apache is down and so on. Quote
willp Posted January 19, 2006 Posted January 19, 2006 This is the error I am getting: Script Execution Error The following error was returned: There was a problem retrieving a response from the cURL executable. The executable was found, however it does not appear to be working properly. Quote
willp Posted February 14, 2006 Posted February 14, 2006 Okie-doky. Here we go again. It's been down for a few days (I've been gone) and lots of potential orders have been placed but payments can't go through without cURL working. Quote
TCH-Thomas Posted February 14, 2006 Posted February 14, 2006 Hi willp, You will need to submit a ticket about this. The techs don´t watch the forum as much as we mods do. Quote
sastian Posted February 14, 2006 Posted February 14, 2006 i just started getting cron errors last night "/home/yourcpanelname/public_html/scripts/cron-curl.sh: line 2: /usr/bin/curl: Permission denied" guess im gonna try mikes suggestion Edit: TCH-Bruce - removed cpanel name from post Quote
sastian Posted February 16, 2006 Posted February 16, 2006 ok, ive tried everything mike suggested. im not having any sucess. just an inbox full of errors. /bin/sh: /home/yourcpanelname/public_html/runcron.php: /usr/local/bin/php <?php : bad interpreter: No such file or directory Quote
TCH-Andy Posted February 16, 2006 Posted February 16, 2006 The cron command you are trying here is incorrect /bin/sh: /home/yourcpanelname/public_html/runcron.php: /usr/local/bin/php<?php : bad interpreter: No such file or directory Try >/home/yourcpanelname/public_html/runcron.php as the cron job. Have you set up the php file as MikeJ suggested? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.