Skip to Main Content

"new PDO" inconsistent in connections across our servers

445512May 23 2012 — edited Sep 23 2012
Using PDO oci, our application web pages connect to various Oracle databases. All database connections before used the following connect strings successfully:
$conn = new PDO("oci:dbname=//servername.domain*:1521*/db_service_name",$db_username,$db_password);
up until last Friday 5/18 when one particular server connection attempt would throw a "Fatal error" unless we modify the connection string as follows:
$conn = new PDO("oci:dbname=//servername.domain/db_service_name",$db_username,$db_password); // no port number

php version appears to be 5.3, database version is, all running on linux RHEL 5. Other connections using RHEL 4, but I believe that is moot in that the app server running php 5.3 with to connect to the database server running oracle was working, but on Monday 5/21, it was not working.

Fatal error when not working is:

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[]: (null)' in /home/driskind/test_oci.php:7
Stack trace:
#0 /home/driskind/test_oci.php(7): PDO->__construct('oci:dbname=//ea...', 'user...', 'password')
#1 {main}
thrown in /home/driskind/test_oci.php on line 7

Note that from this same host, php can connect to older database servers utilizing the connection string with the port number, so I am suspecting a configuration on the database server side for the new database server where connection string using port number fails.

Please don't ask why application doesn't use other methods. They have adamantly stated they wish to continue to use thier application with php configured as is.
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Oct 21 2012
Added on May 23 2012