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 pipe problems

Discussion in 'E-mail Discussions' started by kyle04, Sep 22, 2009.

  1. kyle04

    kyle04 Registered

    Joined:
    Sep 22, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have tried to set up this facility using the following criteria :

    pipe :| /usr/bin/php -q home/myaccount/public_html/emails/pipe_email.php

    email : test@mydomain.co.uk

    php file (portion) :
    #!/usr/local/bin/php -q
    <?
    $fd = fopen("php://stdin", "r");
    $email = "";
    while (!feof($fd)) {
    $email .= fread($fd, 1024);
    }
    fclose($fd);
    //### handle email ###
    $lines = explode("\n", $email); .................... etc

    when sending test emails they are returned to sender with the following error message (part of it only) :

    ------ pipe to |/usr/bin/php -q public_html/emails/pipe_email.php
    generated by test@jpennyltd.co.uk ------

    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/: cannot read file data: Is a directory in Unknown on line 0
    No input file specified.

    I've tried to research this but without success (including this forum where I got the php script and hashbang codes...).
    Any ideas welcome.
    AndyP
     
    #1 kyle04, Sep 22, 2009
    Last edited: Sep 22, 2009
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Using /usr/bin/php -q home/myaccount/public_html/emails/pipe_email.php when your script has a hashbang is redundant.

    In a cPanel/WHM environment, keep the hashbang in your file, but just have your pipe go to:

    /home/myaccount/public_html/emails/pipe_email.php

    If this is only being used for piping email, keep in mind that there is no need for this to be in public_html where it becomes publicly available via a web browser.

    Also make sure your file has executable permissions (e.g. 755).

    If this quick checklist doesn't resolve the issue, I recommend letting our technical analysts taking a look at your server to make sure everything is okay with your PHP installation.
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Your PHP.INI file is attempting to load a dynamic (*.so) module that doesn't exist!

    Open /usr/local/lib/php.ini and search for "\.so" or "extension=" and see what you come up with.

    You might also want to double check the include module folder and make sure that it really actually does exist on your server:
    Code:
    /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
     
Loading...

Share This Page