The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

email piping problem

Discussion in 'E-mail Discussions' started by zyxstand, Sep 15, 2010.

  1. zyxstand

    zyxstand Registered

    Sep 15, 2010
    Likes Received:
    Trophy Points:
    i'm having problems with email piping in cpanel.

    my goal:
    i want users to be able to send an email to an address i created which in turn gets piped to a php script which reads the email and does php stuff (mysql access and stuff) and then send back an email (most likely an email confirmation of their action).

    my setup and problem:
    i created email account.
    i setup forwarding (pipe to a program) letting it use its auto-complete to get point to myscript.php file.
    it now has it set to: to |/home/myusername/public_html/blabla/myscript.php
    myscript.php contains the following (simple) lines:
    #!/usr/bin/php -q
    $subject = "does it work";
    $message = "of course it does!";
    mail('', $subject , $message);
    i change myscript.php permission to all execute (755)
    i tested myscript.php by running it by opening it in the browser - all it does is send an email to a different address, which works.
    i try sending email to the address for which forwarding is set. email bounces and i get the error in the bounced-back email:
     pipe to |/home/blabla/public_html/blabla/myscript.php
       generated by
       local delivery failed
    The following text was generated during the delivery attempt:
    ------ pipe to |/home/blabla/public_html/blabla/myscript.php
          generated by ------
    /usr/bin/php: error while loading shared libraries: cannot open shared object file: No such file or directory

    is this a server-side error? am i going about my goal a completely wrong way? any help is very appreciated?

    thank you in advance,
    #1 zyxstand, Sep 15, 2010
    Last edited: Sep 16, 2010

Share This Page