Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

email pipe problems

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

  1. kyle04

    kyle04 Registered

    Joined:
    Sep 22, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    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,216
    Likes Received:
    10
    Trophy Points:
    313
    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:
    8
    Trophy Points:
    193
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice