I have two RedHat4 servers in one of them I've installed the XAMPP 1.5.1 and the oracle instant client and in the other I've installed the XAMPP 1.5.2 and the oracle instant client.
I haven't upgraded the XAMPP version on none of them.
Both have the same tnsames.ora, in the same path '/opt/lampp', and the same php script. In the server with XAMPP 1.5.1 the php script works fine but in the other with XAMPP 1.5.2 it doesn't work the same php script. The problem is that the oci_connect() function call returns an error in Xampp 1.5.2 and in 1.5.1 version works fine.
I've test also latest xampp version on Kubuntu and have the same problem with oci_connect() function call.
---------------------------------------------------------
The script is the next:
<?php
PutEnv("ORACLE_SID=SID");
PutEnv("ORACLE_HOME=/opt/lamp/lib");
PutEnv("TNS_ADMIN=/opt/lampp");
echo "<html>";
echo "<body>";
$c1 = oci_connect("user", "password", "TNSNAME");
if(!$c1){
echo 'No se pudo conectar a la base de datos \n';
}else{
echo "Conexion realizada con exito\n";
}
echo "</body>";
echo "</html>";
?>
--------------------------------------------------------
The error_log contains these messages:
[Mon May 15 12:56:41 2006] [notice] child pid 7890 exit signal Segmentation fault (11)
[Mon May 15 12:56:42 2006] [error] [client xxx.yyy.zzz.www] PHP Warning: oci_connect() [<a href='function.oci-connect'>function.oci-connect</a>]: Error while trying to retrieve text for error ORA-12154 in /opt/lampp/htdocs/test_oracle.php on line 8
Thanks