You are here: a PHP script works fine when called from the browser but not as a shell script « PHP Programming Language « IT news, forums, messages
a PHP script works fine when called from the browser but not as a shell script

Posted by lawrence k on 12/21/05 19:06

I've got a script called makeRss.php. It works fine if I try to open it
with my browser. It makes an RSS feed for every page on my site. You
can see it working here:

http://www.autostratus.com/index.php?whatPage=makeRss

It does just what I want it to do.

However, I need for this script to get called every 15 minutes. So I
set it up as a cron job. And cron doesn't like calling this thing. Cron
is nice enough to send me an email with an error message. Every 15
minutes I get this:

/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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация