monino

Registered
Jul 12, 2007
3
0
51
Cron php error: Solved

Hi guys i have a problem, i cant run a cron job with php, i try with:

-php -q -f /home/my_user/public_html/hi.php
-php -q -f /home/my_user.com/public_html/hi.php
-php -q /home/my_user/public_html/hi.php
-php -q /home/my_user.com/public_html/hi.php
-php /home/my_user/public_html/hi.php
-php /home/my_user.com/public_html/hi.php

With the errors: No input file specified.

-php -q -f http://www.my_domain.com/hi.php
-php -q -f http://www.my_domain.com/hi.php
-php -q http://www.my_domain.com/hi.php
-php -q http://www.my_domain.com/hi.php
-php http://www.my_domain.com/hi.php
-php http://www.my_domain.com/hi.php

With the errors:
Status: 404
X-Powered-By: PHP/4.4.4
Content-type: text/html
No input file specified.

-lynx --dump http://www.my_domain.com/hi.php and i have the error: /bin/sh: /usr/bin/lynx: Permission denied.

:mad::mad::mad:

And i can run the file with http://www.my_domain.com/hi.php :( can someone help me? Thx
 
Last edited:

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Solved, i am So stupid :D
As you apparently figured out by now, what you quoted incorrectly
as being errors is actually the header information generated by
the PHP CGI binary on your system.

If you specify the path to the CLI binary (not to be confused with the CGI),
you won't get any of those headers echoed back to your cron report.

A better way is to just drop the "php" command from the crontab line
completely and go with a shebang on your script (IE: #!/usr/bin/php)

It would also seem per the response from your script that you should
be passing parameters to the script but did not do so.