Cronjob problem for php file "No input file specified."

Discussion in 'Site & Server Administration' started by globalcashsite, Jan 17, 2010.

  1. #1
    Guys

    I am running a php file that send semail but nothing output in browser. I run this file in browser and it runs successfully but when I add this file in cronjob it gives error "No input file specified."

    I run cronjob with one test file and it executes every minute it means I am adding cronjob in right way i.e. without quotes.

    Moreoever I also pass some parameters in url like &emailid=1&headerid=1 etc

    Please help me what problem it might be.

    GCS
     
    globalcashsite, Jan 17, 2010 IP
  2. FavouritesBlog

    FavouritesBlog Peon

    Messages:
    846
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I just did a quick google for you - http://www.google.co.nz/search?q=cronjob+"No+input+file+specified.

    There are a few solutions there.
     
    FavouritesBlog, Jan 17, 2010 IP
  3. globalcashsite

    globalcashsite Peon

    Messages:
    806
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi buddy

    I did some work on google and find that we can't pass parameters with url in cronjob. I tried same file without passing parameters in url and it worked fine. :)

    Might be still I don't know how to pass parameters in url in cronjob or this is not possible.

    GCS
     
    globalcashsite, Jan 17, 2010 IP
  4. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #4
    Hello globalcashsite,

    You can use lynx -dump or wget to call its URL. You can pass URL parameter, too.
    For example of cron job every minute:
    * * * * * lynx -dump http://yoursite/cron.php?param=value&something=etc
    Code (markup):
    Or you can try my own online cron jobs service www.setcronjob.com to set up cron jobs to call your URL periodically :)

    Hope it helps :)

    Regards,
    Nguyen.
     
    thuankkk, Jan 18, 2010 IP