Jump to content


Photo

Problem With Amember Cron Job


  • Please log in to reply
23 replies to this topic

#1 webgyrl

webgyrl

    Immediate Family

  • Members
  • PipPipPipPip
  • 895 posts

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

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

Edited by TCH-Bruce, 05 April 2006 - 07:02 PM.


#2 TweezerMan

TweezerMan

    Immediate Family

  • Members
  • PipPipPipPip
  • 1,763 posts

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.

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 MikeJ

MikeJ

    Big Gorilla

  • Members
  • PipPipPipPip
  • 2,369 posts

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.
<a href="http://twitter.com/skraggy" target="_blank">Twitter</a> | <a href="http://plurk.com/skraggy" target="_blank">Plurk</a>

#4 webgyrl

webgyrl

    Immediate Family

  • Members
  • PipPipPipPip
  • 895 posts

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

Thanks guys! :flex:

#5 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

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. ;)

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 TCH-Rob

TCH-Rob

    Help Desk Manager

  • Members
  • PipPipPipPip
  • 7,797 posts

Posted 16 September 2005 - 09:53 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.  :clapping:

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.

#7 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

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

#8 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 16 September 2005 - 11:33 PM

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

#9 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 17 September 2005 - 12:02 AM

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! :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. :dance:

#10 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 17 September 2005 - 12:10 AM

As mentioned only the command line curl is off
curl itself is still on and working.

#11 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

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

#12 webgyrl

webgyrl

    Immediate Family

  • Members
  • PipPipPipPip
  • 895 posts

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 TCH-Rob

TCH-Rob

    Help Desk Manager

  • Members
  • PipPipPipPip
  • 7,797 posts

Posted 18 September 2005 - 02:12 PM

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 webgyrl

webgyrl

    Immediate Family

  • Members
  • PipPipPipPip
  • 895 posts

Posted 20 September 2005 - 12:56 PM

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!

:)

#15 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 18 January 2006 - 10:49 PM

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

#16 Head Guru

Head Guru

    Bill Kish Head Guru

  • Admins
  • PipPipPipPip
  • 6,875 posts

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.  I can be reached 24 hours a day seven days per week.

Office :: 800-930-0485 x211
Mobile :: 248-632-3243

email: bill(at)totalchoicehosting.com

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

Thank you for your support and continued business


#17 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

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 Head Guru

Head Guru

    Bill Kish Head Guru

  • Admins
  • PipPipPipPip
  • 6,875 posts

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.  I can be reached 24 hours a day seven days per week.

Office :: 800-930-0485 x211
Mobile :: 248-632-3243

email: bill(at)totalchoicehosting.com

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

Thank you for your support and continued business


#19 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 18 January 2006 - 11:20 PM

Try now?


Thank you! :D

#20 willp

willp

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

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 TCH-Thomas

TCH-Thomas

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 15,164 posts

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, Inc.

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 sastian

sastian

    New To The Neighborhood

  • Members
  • Pip
  • 12 posts

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



Edit: TCH-Bruce - removed cpanel name from post

#23 sastian

sastian

    New To The Neighborhood

  • Members
  • Pip
  • 12 posts

Posted 16 February 2006 - 08:39 AM

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

#24 TCH-Andy

TCH-Andy

    Immediate Family

  • Members
  • PipPipPipPip
  • 4,699 posts

Posted 16 February 2006 - 10:54 AM

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?
Andy Beckett
-----------------
Part of the TCH family since the beginnings of time.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users