Hi,

I've developed a simple script that among other things sends a fax using
hylafax's sendfax program.   If I test it calling directly from the command
line it works fine.

If I let it run from cron it executes everything fine except the fax.

I am using the system call and in order to debug I am using the following
code

...
$cmd = sprintf('/usr/bin/sendfax -n -d %s %s',$fax,$file) ;
mail ("[EMAIL PROTECTED]", "fax", $cmd."\n".system($cmd));
...

The output from the command line (/usr/bin/php /path/to/file/script.php)

/usr/bin/sendfax -n -d fax_number /tmp/fax.txt
request id is 471 (group id 471) for host localhost (1 file)

The output when it executed from cron (*/1 * * * * /usr/bin/php
/path/to/file/script.php)

/usr/bin/sendfax -n -d fax_number /tmp/fax.txt

In both cases the fax.txt has the same content.

Any idea why and how to solve it?

Reply via email to