Hey, I'm trying to get qmail to run a php shell script.
I havent built the script yet, I'm just doing a few tests ... I seem to be able to run "hello world" scripts, and a few simple emailers / file writing scripts using the
php file.php
this executes the file and runs the code. I can also feed in arguments by using the argv[] array, and I can get it to take input, as in the phpbuilder article http://www.phpbuilder.com/columns/darrell20000319.php3
My problem is that qmail runs the script through sh -c command
so if my file is email.php, qmail executes the following:
sh -c php email.php
effectively feeding the email into the script using STDIN (standard input)
The problem is that the scripts don't seem to do anything at all.. none of the functions execute, and actions that work fine when I execute them with just
php email.php
on its own ...
I'm really stumped, but this is something I really want to get working....
If I could just get an inkling as to why it's not executing the scripts...
Thanks
Paul