I'll have to stop replying to my own posts but...
Having placed a chdir($dir_where_pipe.php_is) at the top of the pipe.php script it executes fine.
However I made the mistake of testing it from the shell using
#mail support@da da da .com
The script bombs due to missing headers.
Moral of the story
DONT USE THE SHELL MAIL PROGRAM TO TEST USE A FULLY FLEDGED MAILER