I am getting this error:
ORACLE_HOME environment variable must be set
but when I type:
echo $ORACLE_HOME
I get:
/opt/oracle/product/9.2.0
Just out of curiosity, what do you get when running 'env | grep ORACLE_HOME'?
If ORACLE_HOME shows up then there are a couple of other things to consider.
Is your program running as a cron job? If so, you might want to consider setting the ORACLE_HOME yourself in your program:
$ENV{ORACLE_HOME} ||= '/opt/oracle/product/9.2.0';
If it's not a cron job, is your program being ran by another user that does not have ORACLE_HOME set?
-- Kevin Spencer.