Symptoms:
Fatal error on any oci-connect() from PHP5. Seems to be local config issue but PHP shows OCI8/instant client installed. Never establishes connection, our database admin confirms no activity in the Oracle logs tracing our IP/hostname, and also we can telnet to the Oracle server on port 1521 from ours.
Platform:
Linux RHEL5 Enterprise
Oracle 11G (remote)
PHP 5.3.2
Oracle Instant Client 11.2
OCI8 1.4.1
VMWare guest on a Dell host (details not known)
We are not using connection pooling with 11G
PHP showing OCI installed (same as you'd see in phpinfo):
[root@mbda-portaldev mbda]# php --ri oci8
oci8
OCI8 Support => enabled
Version => 1.4.1
Revision => $Revision: 294447 $
Active Persistent Connections => 0
Active Connections => 0
Oracle Instant Client Version => 11.2
Temporary Lob support => enabled
Collections support => enabledDirective => Local Value => Master Value
oci8.max_persistent => -1 => -1
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
oci8.default_prefetch => 100 => 100
oci8.old_oci_close_semantics => Off => Off
oci8.connection_class => no value => no value
oci8.events => Off => Off
Testing code I am using to establish connection:
<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 'On');
oci_internal_debug(1);
print "\nStarting\n\n";
$conn=oci_connect('user', 'password','//10.x.x.x:1521/PYTHIA.MBDA-DBPROD');
$sql="select * from table";
$s=oci_parse($conn,$sql);
oci_execute($s, OCI_DEFAULT);
print "\n\nFinished\n";
?>
Output of above script (always stops at same line):
Starting
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/opt/php-5.3.2/ext/oci8/oci8.c:1811)
OCI8 DEBUG L1: Got NO cached connection at (/opt/php-5.3.2/ext/oci8/oci8.c:1856)
OCI8 DEBUG: OCIEnvNlsCreate at (/opt/php-5.3.2/ext/oci8/oci8.c:2809)
OCI8 DEBUG: OCIHandleAlloc at (/opt/php-5.3.2/ext/oci8/oci8.c:2620)
OCI8 DEBUG: OCIHandleAlloc at (/opt/php-5.3.2/ext/oci8/oci8.c:2632)
OCI8 DEBUG: OCIHandleAlloc at (/opt/php-5.3.2/ext/oci8/oci8.c:2649)
OCI8 DEBUG: OCIAttrSet at (/opt/php-5.3.2/ext/oci8/oci8.c:2669)
OCI8 DEBUG: OCIAttrSet at (/opt/php-5.3.2/ext/oci8/oci8.c:2678)
OCI8 DEBUG: OCISessionPoolCreate at (/opt/php-5.3.2/ext/oci8/oci8.c:2690)
Note: That's where it stops. It never actually connects. I could change the datasource to "//foobar" and it would do the same.
Help, please!
-jim