|
Posted by news.prolog.net on 06/27/07 00:39
I want to use cron to kick off a shell that uses wget to initiate some php
scripts.
The reason is that I am pretty fluent in php and don't want to learn a new
batch of commands to do some database administrative work in mySQL from
shell. This would be a snap for me to implement using php.
I tried a simple test where I created a php page that prints some junk
output and uses error log commands to put some output to a file. the error
log output code looks like this:
$DebugString= '
Time: ';
$DebugString= $DebugString . date("c") . "PHPFILENAME: xxxxMessagexxxxx";
$EFile = $_SERVER['DOCUMENT_ROOT'] ."/errors/errors.txt ";
error_log($DebugString, 3, "$EFile");
wget seemed to work just fine. In fact, when I used the wget -F option I
could see the page I generated looking exactly as I expected in the output
file wget created.
but nothing was printed to errors.txt.
Since I want to do file I/O along with database work in the php script I
will be calling via wget, the fact that this simple error_log write doesn't
seem to work is troubling.
Anyone out there have any ideas
Thanx in advance,
Dan
Navigation:
[Reply to this message]
|