3

In my CentOS machine I have set my ORACLE_HOME environment variable in the ~/.bash_profile file.

My .bash_profile file

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/bin
ORACLE_HOME=/usr/lib/oracle/11.2/client64
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_HOME
export LD_LIBRARY_PATH
export TNS_ADMIN
export PATH

phpInfo() output: enter image description here

How do I set ORACLE_HOME & TNS_ADMIN in the Environment section? Am I doing anything wrong here?

Chamara Keragala
  • 5,627
  • 10
  • 40
  • 58
  • 1
    is phpinfo() executed by your webserver `httpd`? Then you must add PATH to that user. See http://stackoverflow.com/questions/2837697/how-do-i-add-paths-to-the-apache-path-variable – masegaloeh May 13 '14 at 09:23

1 Answers1

3

Adding export ORACLE_HOME=/usr/lib/oracle/11.2/client64 to /etc/sysconfig/httpd solved the issue.

Chamara Keragala
  • 5,627
  • 10
  • 40
  • 58