cron “No input file specified” solved

2

For quite a while unknown to me my script was not automatically running via the cron job I setup.  After entering my email address in cpanel’s standard cron interface, the email I received said:

Status: 404 Not Found
X-Powered-By: PHP/5.2.5
Content-type: text/html

No input file specified.

A few minutes of searching the net uncovered my mistake. I had a url variable on the command, which cause it not to work. Instead of
php /home/mysite/public_html/filename.php?method=automated
use
php /home/mysite/public_html/filename.php method=automated .

Exclude the question mark in the url variable and that made it work.

Posted in: Development
Tags:

This article has 2 comments

  1. Branden 10/22/2009, 8:42 pm:

    OH MY GOD!! Thank you SOOO much!! I think I literally looked at 70 different sites before finally finding this and fixing it! Thanks sooo much!!!!

  2. Luis 11/11/2010, 9:18 pm:

    Thanks.. very helpful. that little detail was killing me.. and nowhere else I found the solution.

    Solid gold.

    Thanks,

    Luis

Leave a Reply

Your email address will not be published. Required fields are marked *

*




You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">