Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2008
    Location
    Virginia
    Posts
    24

    Free trial: cron job error

    Hello,

    I'm not sure what I did wrong here but I did a search on "Free trial setup" and could no longer find the thread that I used to initially set up my free trial. Its not working, not sending the reminder emails (all emails are set up) or terminating the trial.

    I get "no input file specified" on both jobs:

    php -q /home/tortoise/public_html/clientsupport/modules/includes/hooks/remindtrial.php

    php -q /home/tortoise/public_html/clientsupport/modules/includes/hooks/removetrial.php

    any help would be appreciated.

  2. #2
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Posts
    22
    "no input file specified"
    Means the file isn't there or cron doesn't have permissions to the files;

    Check to see if the files are there and if they're, check group and ownership permissions.

  3. #3
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Hi,

    You are using my Free Trials action hooks for WHMCS I see I go by the same user name over at the WHMCS forums. While they are unsupported, they should still work. The error message you are getting indicates that the file path is wrong.
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  4. #4
    Join Date
    Apr 2011
    Location
    PHP
    Posts
    17
    Using cron with php command, this should be the point:
    1. in the your_script.php file put this at the top the first line before anything:
    !#/usr/bin/php
    2. file your_script.php should chmod 755
    3. see your phpinfo to use the real path of php, ex: "/usr/bin/php" to macth your configuration
    4. use this cron command
    php -f /home/your_username/public_html/your_script.php
    the /home/your_username/ is your path on server

    Another way using cron without "!#/usr/bin/php" on your_script.php:
    1. curl
    curl -s -o /dev/null http: //yourdomain . com/your_script.php
    2. lynx
    lynx -dump http: //yourdomain . com/your_script.php > /dev /null
    3. wget
    /usr/bin/wget -O - /home/your_username/public_html/script.php
    4. GET
    GET http: //yourdomain . com/your_script.php > /dev /null
    5. links
    links http: //yourdomain . com/your_script.php

    source: http: // jawaad.blogspot. com/2007/07/cron-job-working-via-cpanel.html (my old blog)

    *) notes: sorry I can not use code format and not correct url http link, because I should more 5 posts in this WHT forum.

  5. #5
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Quote Originally Posted by jinbatsu View Post
    Using cron with php command, this should be the point:
    1. in the your_script.php file put this at the top the first line before anything:
    !#/usr/bin/php
    2. file your_script.php should chmod 755
    3. see your phpinfo to use the real path of php, ex: "/usr/bin/php" to macth your configuration
    4. use this cron command
    php -f /home/your_username/public_html/your_script.php
    the /home/your_username/ is your path on server

    Another way using cron without "!#/usr/bin/php" on your_script.php:
    1. curl
    curl -s -o /dev/null http: //yourdomain . com/your_script.php
    2. lynx
    lynx -dump http: //yourdomain . com/your_script.php > /dev /null
    3. wget
    /usr/bin/wget -O - /home/your_username/public_html/script.php
    4. GET
    GET http: //yourdomain . com/your_script.php > /dev /null
    5. links
    links http: //yourdomain . com/your_script.php

    source: http: // jawaad.blogspot. com/2007/07/cron-job-working-via-cpanel.html (my old blog)

    *) notes: sorry I can not use code format and not correct url http link, because I should more 5 posts in this WHT forum.
    Um you don't need to do any of that. Just use the correct location in your command
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  6. #6
    Join Date
    Apr 2011
    Location
    PHP
    Posts
    17
    Quote Originally Posted by larwilliams View Post
    Um you don't need to do any of that. Just use the correct location in your command
    Yes, but in the past around year 2007, I have once try in a hosting, and it seems I can not make it correct, even the path is correct.

    So I try to google, and I find so many other way, and use it as the trial and error, until I get the correct smooth result.

    Different host, has also different way.. (at least I've try in 2 host and has different way to make it correct cron).
    But for now, maybe all host seems no problem with cron command line php.

  7. #7
    Join Date
    Mar 2008
    Location
    Virginia
    Posts
    24
    Quote Originally Posted by larwilliams View Post
    Hi,

    You are using my Free Trials action hooks for WHMCS I see I go by the same user name over at the WHMCS forums. While they are unsupported, they should still work. The error message you are getting indicates that the file path is wrong.
    Thanks, my old laptop died and for the life of me I could not recall where I'd got the hooks

    Ok, I kinda figured that the path was incorrect because I think I followed the directions to the letter.

    By the way do you have the directions?

    Thanks

  8. #8
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Quote Originally Posted by GRODT$ View Post
    Thanks, my old laptop died and for the life of me I could not recall where I'd got the hooks

    Ok, I kinda figured that the path was incorrect because I think I followed the directions to the letter.

    By the way do you have the directions?

    Thanks
    I just realized that you are attempting to run the latest version of my Free Trials mod using cron jobs. That is not how they work. They are called by the WHMCS daily cron job.

    Could you tell me the exact address of where you downloaded the files, so I can confirm this is the version you are using?
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  9. #9
    Join Date
    Jan 2008
    Location
    St. John's, NL
    Posts
    2,201
    Download and use this one instead. Delete the existing 2 cron jobs before you install it, then upload the files and configure it as per the readme.txt included with it. Ignore the line about installing cron jobs, it is a mistake.
    Attached Files Attached Files
    Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
    LCWSoft - Canada web hosting (based in Newfoundland) since 2007
    Servers based in the US and Canada (Uptime Report)

  10. #10
    Join Date
    May 2009
    Location
    United Kingdom
    Posts
    1,695
    Quote Originally Posted by larwilliams View Post
    Download and use this one instead. Delete the existing 2 cron jobs before you install it, then upload the files and configure it as per the readme.txt included with it. Ignore the line about installing cron jobs, it is a mistake.
    Thank you for sharing your trial free trial mod

    This looks like the best one I've seen.
    Zomex ~ Templates & services for web hosting resellers since 2009!
    #1 Web Hosting Templates for WHMCS Templates | WordPress | HTML | Blesta | Clientexec
    █ Professional WHMCS Services | Installation | Configuration | Integration | Upgrades

  11. #11
    Join Date
    Mar 2008
    Location
    Virginia
    Posts
    24
    Quote Originally Posted by larwilliams View Post
    Download and use this one instead. Delete the existing 2 cron jobs before you install it, then upload the files and configure it as per the readme.txt included with it. Ignore the line about installing cron jobs, it is a mistake.

    Thanks Lar,

    I will try it tonight.


    Will

Similar Threads

  1. Cron Job error in WHMCS
    By BlackHost in forum Hosting Software and Control Panels
    Replies: 4
    Last Post: 12-27-2010, 09:24 AM
  2. Error when Running Cron job with feedwordpress
    By hardjoko in forum Hosting Security and Technology
    Replies: 5
    Last Post: 07-26-2006, 10:44 AM
  3. Cron job Help: Can any one Help with Commands for Cron Jobs????
    By pal_web in forum Hosting Security and Technology
    Replies: 4
    Last Post: 06-16-2006, 02:43 PM
  4. run-parts /etc/cron.daily & Anacron job 'cron.daily problems
    By 0218 in forum Hosting Security and Technology
    Replies: 0
    Last Post: 12-12-2004, 10:24 PM
  5. What is a Cron Job?
    By .::DefCon::. in forum Dedicated Server
    Replies: 4
    Last Post: 02-17-2002, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •