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!

oci8 does not work from cPanel mail pipe

Discussion in 'General Discussion' started by bormogl, Feb 15, 2015.

  1. bormogl

    bormogl Registered

    Joined:
    Feb 15, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Folks,

    I have Oracle 11.2 XE and oci8 installed via PECL,

    it works just fine from Apache, from Command line, from cron etc. But it does not work in script I use as a "Pipe to a Program" for default email.

    All ways are using /usr/local/bin/php and all of them see /usr/local/lib/php.ini

    I created this script for tests:

    PHP:
    #!/usr/local/bin/php
    <?

    ob_start();
    phpinfo();
    $phpinfo = ob_get_contents();
    ob_end_clean();

       mail ('xxx','mail', $phpinfo);
    ?>
    When I run it from command line - oci8 is there, when from cPanel Pipe - no.

    Any ideas?

    I tried putenv etc.
     
  2. bormogl

    bormogl Registered

    Joined:
    Feb 15, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Solved.

    cPanel runs it under user itself, so adding ORACLE_HOME and PATH to .bash_profile of the user helped to solve it.
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,730
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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