|
Posted by Lars Eighner on 12/21/05 21:33
In our last episode,
<1135184813.363991.89850@g49g2000cwa.googlegroups.com>,
the lovely and talented lawrence k
broadcast on comp.lang.php:
> /home/httpd/vhosts/autostratus.com/httpdocs/makeRss.php: line 1: ?php:
> No such file
> or directory
> /home/httpd/vhosts/autostratus.com/httpdocs/makeRss.php: line 2: syntax
> error near
> unexpected token `"tagIndexLibrary.php"'
> /home/httpd/vhosts/autostratus.com/httpdocs/makeRss.php: line 2:
> `include_once("tagIndexLibrary.php");
> Why would cron have a problem if the script works fine from the web
> browser?
The executable is php, not your php script. The server knows
this. The operating system does not.
The first two characters of your file need to be #! followed
immediately by the path to php (not makeRss.php) - and when I
say first two characters, I mean the first two characters with
no preceding empty lines or spaces. Or you can call php from
chron with your script as an argument.
--
Lars Eighner usenet@larseighner.com http://www.larseighner.com/
My mail reader can beat up your mail reader.
Navigation:
[Reply to this message]
|