Piping Email To PHP Script

Hi when you pipe your program to your script you may encounter this error

Make sure you have the Shebang on the top of your script

#!/usr/bin/php -q

You might see this error

Error in argument 1, char 3: option not found

The following text was generated during the delivery attempt:

------ pipe to |/home1/<account>/pipe.php

generated by pipe@example.com ------

This could mean the file is in the wrong format because you are using windows.


Hi, The solution is > You need to convert the hesk_pipe.php from the DOS/WINDOWS CR LF line termination to UNIX LF line termination. Or at least remove the CR character from the first line.

Converting the file to a UNIX format can also be done by editing the file in CPanel… just open using the File Manager and resave it in cpanel