Question Having Trouble with OCI8

Cory16

New Pleskian
Server operating system version
Almalinux 9.4
Plesk version and microupdate number
18.0.63 #1
I'm following this thread (below) and still can't get OCI8 to work on my system:


My system is:
Insta-client downloaded was 23.5
PHP 8.3.10
Alma 9
Plesk Obsidian Web Host Edition Version 18.0.63 Update #1

The thread is a little old. Can anyone help me, that would be appreciated.

Trying to query a Oracle 19C database.

Thanks,

Cory
 
I think it has to do with the Oracle Client (Insta Client) installation not being in the folder and not installed properly - I'm working on it. It would be nice to have a step by step on installing Oracle Client.
 
I did... It seems like OCI8 is installed... Oracle is installed and working (I can log in using SQLPLUS on all users (oracle, root, and the one php uses).

I say "seems" because the oci_connect command is there and it does recognize it as a command... my php_info does list OCI8 information now, the only thing is now the:

$conn = oci_connect($USER_NAME, $PASSWOOD, $DATABASE)

results in a null being set in $conn, no error, no nothing - I've tried using the TNSNAMES entry, I've tried with the full connection entry... and NOTHING.
 
So... it was the ORACLE_HOME and LD_LIBRARY_PATH environmental variables not being set... I need to figure out how to set them once in Linux, but adding this to my php code at the beginning of every sheet that queries oci8 works:

putenv("LD_LIBRARY_PATH=/path/to/oracle/home/lib");
putenv("ORACLE_HOME=/path/to/oracle/home");

Now to set it once.
 
Back
Top