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.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page