Oracle Connection - Scriptcase 9 - Linux 64 Bits

Á

Álvaro Moura

Last updated on Jul 6, 2026

This procedure will only work if you have a Scriptcase manual installation in your server.

To connect with Oracle in a Linux System, we must follow these steps below:

Step 1 -  Installing these packages:

UBUNTU/DEBIAN CENTOS/RHEL
- sudo apt-get update - sudo apt-get install libaio1 - sudo apt-get install libncurses5 - sudo apt-get install alien - sudo apt-get install gcc-multilib g++-multilib - sudo apt-get install libpam0g - sudo apt-get install unixodbc-dev unixodbc - sudo yum update - sudo yum install libaio-devel - sudo yum install libaio - sudo yum install glibc - sudo yum install compat-libstdc++-33 - sudo yum install glibc-devel - sudo yum install libstdc++ - sudo yum install pam - sudo yum install ncurses-devel - sudo yum install unixODBC

Step 2 - Install the Instant Client:

Download the Instant Client version compatible with the archicteture x64:

UBUNTU/DEBIAN CENTOS/RHEL
- sudo alien oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm - sudo alien oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm - sudo dpkg -i oracle-instantclient12.1-basic_12.1.0.2.0-2_amd64.deb - sudo dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb - sudo yum install oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm - sudo yum install oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

Step 3 - Copy the extension to the PHP extensions directory:

Download and extract the attached file(oci8.zip) and move this file in the PHP extensions directory.

Accessing the info.php file, search for the line extension_dir. This line will inform the exact path to the PHP extensions.

Step 4 - Edit the php.ini file:

Now that the extension was pasted at the directory, you will need to add at the bottom of the php.ini file this line below:

extension=oci8.so

Step 5 - Declare the environment variable responsible to identify the Oracle library:

Now it is necessary to declare the variable LD_LIBRARY_PATH in the responsible file for your system environment variables.

Check the path according to your System:

UBUNTU/DEBIAN CENTOS/RHEL
- sudo nano /etc/apache2/envvars - sudo nano /etc/sysconfig/httpd

The path to the library will depend on your installation. However, by default the path might be the same as this example:

Following the same example from php.ini, you will need to add just this variable at the bottom of the file with this syntax:

export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/

If you are using CentOS/RHEL, you don't need to use the 'export' before the variable.

After doing all these procedures, you will need to restart your apache service.

UBUNTU/DEBIAN CENTOS/RHEL
- sudo service apache2 restart - sudo systemctl restart httpd