http://www.php.net/features.commandline
Notable quotes from that page:
"As of version 4.3, PHP supports a new SAPI type named CLI which menas
Command Line Interface."
"The CLI SAPI was released for the first time with PHP 4.2.0 but was still
experimental back then and had to be explicitly enabled with --enable-cli"
...
"PHP 4.3 and above automatically have STDOUT, STDIN, and STDERR openned ...
but < 4.3.0 do not."
Also, did you notice that your PHP usage information doesn't list -r as an
available option?
What does all this mean?
1) It means that you're using a version that doesn't have the -r switch in
the compiled executable for one of two reasons: It wasn't written yet, or
you need to compile PHP differently on your system to enable it.
2) You don't have acecss to STDERR as a defined open filestream constant
anyway.
3) You didn't read the manual page closely.
You can upgrade to 4.2.2 and try compiling with the --enable-cli flag, and
if that doesn't work, you can upgrade to 4.3.
nik