Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On the web server, apache needs the environment vars to run the OCI adapter

PHP56 LD library Configuration

Code Block
languagebash
# for php56
cd /home/oracle
vi .profile

...

Code Block
languagebash
# This data will vary depending on the version
ORACLE_HOME=/usr/lib/oracle/18.3/client64
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOME
export LD_LIBRARY_PATH
export PATH

PHP72 LD library Configuration

Set up links the LD Library

...

Code Block
languagebash
# ldconfig

PHP72 Alternative LD library Configuration

Set up links for Apache

Code Block
# for php72, the environment vars must be set globally for apache
vi /etc/sysconfig/httpd

...

Code Block
languagebash
# OCI8 PHP Extension
# This data will vary depending on the version
ORACLE_HOME=/usr/lib/oracle/18.3/client64
LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib
export ORACLE_HOME
export LD_LIBRARY_PATH

Cron Jobs AlternativeĀ LD library Configuration (root access)

Code Block
# On some servers, it also necessary to add the environment vars to the global profile so it will work for root
vi /etc/profile.d/oci8.sh

...