Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm am in charge of a VPS with one hosted website. I need to run a crop job for the site and am having much trouble with it.

From the cpanel for the site I'm running

php -q /home/siteusername/public_html/cron_764445573.php?nqL5yOfTqRoldguGujnJEN9hE44RTYT6cnFGd-F4uDI=-gVVUqf5mpesIwmFjY3cZDqly99nKP0PglHuyxzWKbI

However it is failing to work. Please note that I had removed the sites user name for the purpose of posting code on the net. I keep getting and email saying it has failed with the content 'No input file specified'. I have most defiantly checked to make sure the path and file is correct. The file defiantly exist and does run correctly. The path is correct as taken form $_SERVER via php.

Is there something I'm missing? I have done much research and from what I can tell it should work fine.

share|improve this question

I guess you don't have a file name like that. What you probably have there is /home/siteusername/public_html/cron_764445573.php, right?

After that is where your troubles start. From the command line you can't append parameters like that (file.php?foo=bar) and expect it to be properly parsed.

What you need to do is to call the parameters like

php -q yourfile.php param1=value1 param2=value2 

So in your case

php -q /home/siteusername/public_html/cron_764445573.php nqL5yOfTqRoldguGujnJEN9hE44RTYT6cnFGd-F4uDI=-gVVUqf5mpesIwmFjY3cZDqly99nKP0PglHuyxzWKbI
share|improve this answer
I tried that and it is still failing. I actually ran the job without any parameters and it still telling giving me the 'No input file specified' message. It there a way I can check/clarify this file location? From what I can decipher it is correct. This is the file root I use through all the coding in the website with no issues. Maybe it is incorrect. – Shane Jul 26 '12 at 6:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.