Document toolboxDocument toolbox

Oracle



Note: Oracle is not supported for new installs; existing installations require Oracle version 12.2 or greater.

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

We highly recommend installing Oracle on a dedicated database server. To communicate with Oracle on that server completing this installation will require the username, password, hostname, port (e.g. 1521) and SID.

Download and install the Oracle Instant Client on the PCR-360 application server. This is required before installing the PHP oracle driver (oci8).

Required to compile OCI8 PHP module:

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:

oracle-instantclientxx.x-sqlplus-xx.x.x.x.x-x.x86_64.rpm

Download each and install each using rpm:

rpm -ivh oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm rpm -ivh oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm rpm -ivh oracle-instantclient18.3-sqlplus-18.3.0.0.0-1.x86_64.rpm

Install OCI8 (for PHP < 7):

Install OCI8 for PHP 7+

Oracle OCI8 and SQL Plus Configuration

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

PHP56

Paste in this data. Be sure to adjust for install directory and version.

PHP72

Add the following to the end of the file

User Configuration

On the Oracle database server, create two Oracle users and two schema. These will hold the application data and the application metadata, the examples below use pcr360_prod and pcr360_prod_metadata.

Impersonate the oracle user and login to the database. This requires sqlplus to be installed and configured:

Grant the required permissions to the users. Be sure to modify the passwords.



Related pages