Running PHP from the shell or CRON???
| From: | Claude Cormier | Date: | Mon, 28 Aug 2000 14:41:26 +0000 |
| Subject: | Running PHP from the shell or CRON??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-13949@lists.php.net to get a copy of this message | ||
Hi,
I am trying to run PHP from a shell via telnet. I am testing this
because I eventually want to have a CRON job running this PHP script
every day. The PHP script will simply check a site, parse the page and
select some info to update a MySQL db.
So I issue either one of the following shell command:
%php mytest.php or
%php ./mytest.php
and received the following error:
~~~~~~~~~~~~~~~~~~~~~~~~~~
X-Powered-By: PHP/4.0.1.pl2
Content-type: text/html
<br>
<b>Fatal Error</b>: Unable to open mytest in <b>Unknown</b> on line
<b>0</b><br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am runnuing this command for a cgi-bin where I have both PHP and
mytest.php in it.
cgi-bin is not in my path.
So my question is can PHP be executed from the shell or from a CRON job,
if yes what is the problem with the above?
Thanks
Claude C