Table of Contents | ||||
---|---|---|---|---|
|
Note: Oracle is not supported for new installs; existing installations require Oracle version 12.2 or greater is required.
Install Notes
- Schema names are case sensitive as of Oracle 12 and need to be in all caps in the PCR-360 config file to avoid errors
- Included in the installation package is a file named oracle-create.sql; log into the main schema and execute these commands. Also included is a file named oracle-create-metadata.sql; log into the metadata schema and execute these commands.
- If PHP is upgraded, you may need to update or install the latest instant client. A general rule of thumb is if PHP packages are upgraded, plan on upgrading the instant client as well. This package is frequently updated, so if the server is updated and the application stops working, try upgrading to the latest instant client.
- To upgrade to the latest instant client, you should uninstall the old version, and install the latest.
- The Database should be using a UTF8 format and the column lengths should all be Characters instead of Bytes.
- If your Database was built using Bytes instead of Characters, often each column has to be converted individually, simply running "ALTER SESSIONSET NLS_LENGTH_SEMANTICS ='CHAR';" will not work because it does not convert existing columns, only new columns added after running the command are affected.
Instant Client Installation
...
Download and install the Oracle Instant Client on the PCR-360 application server. This is required before installing the PHP oracle driver (oci8).
If there is a previously installed version, you will need to remove it first
...
.
...
Required to compile OCI8 PHP module:
Code Block | ||
---|---|---|
| ||
# This command will vary depending on the version
oracle-instantclientxx.x-basic-xx.x.x.x.x-x.x86_64.rpm
oracle-instantclientxx.x-devel-xx.x.x.x.x-x.x86_64.rpm
|
Required to use the sqlplus interface:
Code Block | ||
---|---|---|
| ||
# This command will vary depending on the version
oracle-instantclientxx.x-sqlplus-xx.x.x.x.x-x.x86_64.rpm
|
Download each and install each using rpm:
Code Block | ||
---|---|---|
| ||
# This command will vary depending on the version yum installrpm -ivh oracle-instantclientxxinstantclient18.x3-basic-xx18.x3.x0.x0.x0-x1.x86_64.rpm yumrpm install-ivh oracle-instantclientxxinstantclient18.x3-devel-xx18.x3.x0.x0.x0-x1.x86_64.rpm yumrpm install-ivh oracle-instantclientxxinstantclient18.x3-sqlplus-xx18.x3.x0.x0.x0-x1.x86_64.rpm |
Install OCI8 (for PHP < 7):
...
On the web server, apache needs the environment vars to run the OCI adapter
PHP56
...
Code Block | ||
---|---|---|
| ||
# for php56 cd /home/oracle vi .profile |
Paste in this data. Be sure to adjust for install directory and version.
Code Block | ||
---|---|---|
| ||
# 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
...
Set up links the LD Library
Try this first, if it does not work, then try on f the alternative methods below
Add the library path to /etc/ld.so.conf.d/oracle-instantclient.conf:
Code Block | ||
---|---|---|
| ||
/usr/lib/oracle/18.5/client64/lib |
The next command is needed to create the new links & cache
Code Block | ||
---|---|---|
| ||
# 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 |
...
PATH=$ORACLE_HOME
/bin
:$PATH
will not correctly load the environment variable. YOU MUST INCLUDE THE FULL PATH of the Oracle Client
Add the following to the end of the file
Code Block | ||
---|---|---|
| ||
# 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 |
NOTE: Variables aliases will not work in these scripts. For Example:
PATH=$ORACLE_HOME
/bin
:$PATH
will not correctly load the environment variable. YOU MUST INCLUDE THE FULL PATH of the Oracle Client
Add the following to the file. This change requires a server reboot reboot.
Code Block | ||
---|---|---|
| ||
# 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 |
...