Click here to Skip to main content
15,359,445 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to connect to remote oracle db and getting this error
ORA-24315: illegal attribute type



If (!$conn)
echo 'Failed to connect to Oracle error';

echo 'Succesfully connected with Oracle DB';
$e = oci_error(); // For oci_connect errors pass no handle

Can anybody help me with this?

What I have tried:

tried with only hostname, servicename.
Updated 16-Mar-22 22:15pm
Maciej Los 15-Mar-22 9:42am
Does HOST=host is storing proper IP address?
And - please - read this:

I think you need the actual values of the various parameters in the string. For example is "host" the actual name of the Oracle server? See Configuring Naming Methods[^].
Seems, that ORA-24315 error is caused by incomplete installation (OCI libraries are missing). See: Sfaturi Oracle / Tips and tricks OracleDBA: ORA-24315 in PHP function oci_connect[^]
I added tnsnames.ora file at this path ORACLE_HOME/network/admin and it started working again.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900