Forum Moderators: coopster

Message Too Old, No Replies

Cron Job

         

leequalls

4:40 pm on Jun 16, 2007 (gmt 0)

10+ Year Member



I am getting an error running a php file with cron job:

/home/leeq/www/control/admincron.php: line 1:?php: No such file or directory
/home/leeq/www/control/admincron.php: line 2: syntax error near unexpected token `"../vars.php"'
/home/leeq/www/control/admincron.php: line 2: `include("../vars.php");'

Frank_Rizzo

5:55 pm on Jun 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you get the same error if you run the script from the command line?

If yes then cron job is not the problem here.

mcibor

9:37 pm on Jun 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Moreover there can be other problems.

You can try:

lynx -dump http://example.com/file.php

or

/usr/bin/php -q /home/http/file.php

I can check how I do it on my page, but for that I need to change my computer (I don't know how to ssh on mac ;) )

Hope still this helps you. So you need to run this file, with IE or php, so to speak.

Regards
Michal

[edited by: encyclo at 2:36 am (utc) on July 2, 2007]
[edit reason] switched to example.com [/edit]

Habtom

5:07 am on Jun 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> `include("../vars.php");'

The two single quotes at the two ends don't look the same. How is that appearing. I think you should look into something like that small which could be creating the problem.

'include("../vars.php");'

Hab