oci8 does not work from cPanel mail pipe
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);
?>[/PHP]
When I run it from command line - oci8 is there, when from cPanel Pipe - no.
Any ideas?
I tried putenv etc.
-
Solved. cPanel runs it under user itself, so adding ORACLE_HOME and PATH to .bash_profile of the user helped to solve it. 0 -
Hello :) I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
2 comments