I am trying to run a php script via cron - but it is not working

Avatar
  • Answered
Here is the cron command:
php -q /home/myhost/public_html/mydomain/myscript.php?query=data
with 'myhost' , 'mydomain' and 'myscript.php' with my host name and script.

but the email returns: No input file specified.

I am sure the path is correct, checked with chat support and I know the script executes properly - any help is greatly appreciated.
Avatar
johnpaulb-imhs1
Hello gregdbowen, Thankyou for contacting us today. I tested the cron and it gets an error when you run it with the variable on the end. For example: php -q /home/usera99/public_html/mydomain/myscript.php?query=data Could not open input file: /home/usera99/public_html/mydomain/myscript.php?query=data When you run it without the variable, it does not return an error. For example: php -q /home/usera99/public_html/mydomain/myscript.php array(0) { } I recommend checking the variable to make sure it is accurate. I was able to test this by connecting to my server via SSH. Thank you, John-Paul