简体   繁体   中英

Email piping not working for PHP script. Local delivery failed error

In cPanel I have piped the following to my script:

alerts@XXX.com  to  |/home/XXX/public_html/client/inc/msg/mailReader.php

I get the following email returned:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/XXX/public_html/client/inc/msg/mailReader.php generated by alerts@XXX.com local delivery failed

The path to mailReader.php is definitely correct, as well as the path to PHP in the shebang in mailReader.php. Line 1 is:

#!/usr/local/lib/php -q<?php

Do you have any idea why it would return the "local delivery failed" error?

The directory was actually #!/usr/bin/php -q. I have 2 other directories that have the files for PHP but this isn't looking for the PHP directory, its looking for the compiled PHP file in bin called "php".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM