TotalChoice Hosting Family Forums: Problem With Amember Cron Job - TotalChoice Hosting Family Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem With Amember Cron Job CURL is denied

#1 User is offline   webgyrl Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 26-June 03

Posted 15 September 2005 - 09:51 AM

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-doma...member/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

/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

This post has been edited by TCH-Bruce: 05 April 2006 - 07:02 PM


#2 User is offline   TweezerMan Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 1,767
  • Joined: 26-September 04

Posted 15 September 2005 - 10:45 AM

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.

Quote

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.
David Phillips (TweezerMan)
The Tweezer's Edge v3

#3 User is offline   TCH-MikeJ Icon

  • Big Gorilla
  • PipPipPipPip
  • Group: Moderators
  • Posts: 2,377
  • Joined: 21-January 04

Posted 15 September 2005 - 02:05 PM

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.
Mike Jones, Lurking Guru
TotalChoice Hosting, L.L.C.

Have a dedicated server? Make sure to visit the Dedicated Server Talk forum for customer-to-customer support and the TCHNOC Dedicated Servers forum for announcements!

Twitter | Plurk

#4 User is offline   webgyrl Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 26-June 03

Posted 16 September 2005 - 09:03 AM

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.... :eek:

Thanks guys! :clapping:

#5 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 16 September 2005 - 06:38 PM

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. :angry:

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.

#6 User is offline   TCH-Rob Icon

  • Help Desk Manager
  • PipPipPipPip
  • Group: Members
  • Posts: 7,818
  • Joined: 11-March 03

Posted 16 September 2005 - 09:53 PM

willp, on Sep 16 2005, 06:38 PM, said:

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.  :angry:

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

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.

#7 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 16 September 2005 - 11:27 PM

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 :thumbdown:.

#8 User is offline   TCH-Don Icon

  • Volunteer Moderator
  • PipPipPipPip
  • Group: Moderators
  • Posts: 11,679
  • Joined: 30-November 02

Posted 16 September 2005 - 11:33 PM

I would open a help desk ticket to the techs
and give them the error message.
Don Rosenquist
Forum Moderator
TotalChoice Hosting, L.L.C.
Web Hosting by Total Choice Web Hosting - For Your Family - Web Hosting Family!

Any links or suggestions for third party software/sites should be used at your own risk.
My opinions and recommendations are not necessarily those of TCH and TCH is not responsible.

I am a Forum Moderator and a volunteer. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related questions. Should you need assistance in these areas, please contact our Help Desk.


treasure your pets

The Turtle says "A little knowledge is a dangerous thing,
so keep learning!"

#9 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Post icon  Posted 17 September 2005 - 12:02 AM

TCH-Don, on Sep 17 2005, 12:33 AM, said:

I would open a help desk ticket to the techs
and give them the error message.


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! :clapping:

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. :D

#10 User is offline   TCH-Don Icon

  • Volunteer Moderator
  • PipPipPipPip
  • Group: Moderators
  • Posts: 11,679
  • Joined: 30-November 02

Posted 17 September 2005 - 12:10 AM

As mentioned only the command line curl is off
curl itself is still on and working.
Don Rosenquist
Forum Moderator
TotalChoice Hosting, L.L.C.
Web Hosting by Total Choice Web Hosting - For Your Family - Web Hosting Family!

Any links or suggestions for third party software/sites should be used at your own risk.
My opinions and recommendations are not necessarily those of TCH and TCH is not responsible.

I am a Forum Moderator and a volunteer. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related questions. Should you need assistance in these areas, please contact our Help Desk.


treasure your pets

The Turtle says "A little knowledge is a dangerous thing,
so keep learning!"

#11 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 17 September 2005 - 12:45 AM

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 :tchrocks!:

#12 User is offline   webgyrl Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 26-June 03

Posted 18 September 2005 - 09:45 AM

TCH does rawk... but it would have been nice to know that curl was going to be disabled ahead of time.

#13 User is offline   TCH-Rob Icon

  • Help Desk Manager
  • PipPipPipPip
  • Group: Members
  • Posts: 7,818
  • Joined: 11-March 03

Posted 18 September 2005 - 02:12 PM

View Postwebgyrl, on Sep 18 2005, 09:45 AM, said:

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.

#14 User is offline   webgyrl Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 26-June 03

Posted 20 September 2005 - 12:56 PM

View PostTCH-Rob, on Sep 18 2005, 03:12 PM, said:

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!

:tchrocks!:

#15 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 18 January 2006 - 10:49 PM

And it appears cURL is down on my server again... :thumbdown:

#16 User is offline   Head Guru Icon

  • Bill Kish Head Guru
  • PipPipPipPip
  • Group: Admins
  • Posts: 6,424
  • Joined: 15-October 02

Posted 18 January 2006 - 10:53 PM

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.
Bill Kish
Head Cook and Bottle Washer

If you need help with your account or have any questions, please feel free to contact me using any of the contact methods below:

Via telephone at my office number:
800-930-0485 x211

Via my mobile phone:
248-632-3243

Via my office email:
bill(at)totalchoicehosting.com

Via my Blackberry instant push email:
billkish (at)att.blackberry.net

Via my mobile phone Instant Messenger:
tchgurubillpda

Via Instant Messenger:
AOL Instant Messenger: tchgurubill
Yahoo Messenger: tchgurubill
MSN Messenger: tchgurubill@hotmail.com


"Anyone in any walk of life who is content with mediocrity is untrue to himself and the American way."
General George S. Patton
US ARMY

#17 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 18 January 2006 - 11:05 PM

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.

#18 User is offline   Head Guru Icon

  • Bill Kish Head Guru
  • PipPipPipPip
  • Group: Admins
  • Posts: 6,424
  • Joined: 15-October 02

Posted 18 January 2006 - 11:15 PM

Try now?
Bill Kish
Head Cook and Bottle Washer

If you need help with your account or have any questions, please feel free to contact me using any of the contact methods below:

Via telephone at my office number:
800-930-0485 x211

Via my mobile phone:
248-632-3243

Via my office email:
bill(at)totalchoicehosting.com

Via my Blackberry instant push email:
billkish (at)att.blackberry.net

Via my mobile phone Instant Messenger:
tchgurubillpda

Via Instant Messenger:
AOL Instant Messenger: tchgurubill
Yahoo Messenger: tchgurubill
MSN Messenger: tchgurubill@hotmail.com


"Anyone in any walk of life who is content with mediocrity is untrue to himself and the American way."
General George S. Patton
US ARMY

#19 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 18 January 2006 - 11:20 PM

View PostHead Guru, on Jan 18 2006, 11:15 PM, said:

Try now?


Thank you! :clapping:

#20 User is offline   willp Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 10-June 03

Posted 14 February 2006 - 09:41 AM

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.

#21 User is online   TCH-Thomas Icon

  • Volunteer Moderator
  • PipPipPipPip
  • Group: Moderators
  • Posts: 15,154
  • Joined: 01-May 03

Posted 14 February 2006 - 09:47 AM

Hi willp,
You will need to submit a ticket about this. The techs don´t watch the forum as much as we mods do.
Thomas Jikrantz
Forum Moderator
TotalChoice Hosting, L.L.C.

Any links or suggestions for third party software/sites should be used at your own risk. My opinions and recommendations are not necessary those of TCH and TCH is not responsible.

As a Forum Moderator I can assist in answering many of your hosting related questions. However, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.

Web Hosting by Total Choice Web Hosting - 24/7 Help Desk

#22 User is offline   sastian Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 12
  • Joined: 29-January 04

Post icon  Posted 14 February 2006 - 10:46 AM

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 :wallbash:



Edit: TCH-Bruce - removed cpanel name from post

#23 User is offline   sastian Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 12
  • Joined: 29-January 04

Posted 16 February 2006 - 08:39 AM

ok, ive tried everything mike suggested. im not having any sucess.

just an inbox full of errors.

:surrender:

/bin/sh: /home/yourcpanelname/public_html/runcron.php: /usr/local/bin/php
<?php
: bad interpreter: No such file or directory

#24 User is offline   TCH-Andy Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Staff
  • Posts: 4,729
  • Joined: 14-January 03

Posted 16 February 2006 - 10:54 AM

The cron command you are trying here is incorrect

Quote

/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?
Andy Beckett

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users