ZF-10432: Checking the database host name to decide whether or not to use tnsnames.ora fails

Issue Type: Bug Created: 2010-09-08T01:00:53.000+0000 Last Updated: 2011-04-14T15:16:21.000+0000 Status: Open Fix version(s): Reporter: Dieter Provoost (fabrizzio) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: Attachments:


Config file sample:

; ------------------------------------------------------------------------------- [production] ; ------------------------------------------------------------------------------- database.adapter = pdo_oci = my-host

; ------------------------------------------------------------------------------- [staging : production] ; ------------------------------------------------------------------------------- = ;

When Zend_Db_Adapter_Pdo_Oci checks whether to use a tnsnames.ora entry or use the provided config settings, it uses this structure:

<pre class="literal">
if (isset($dsn['host'])) {
// use provided config settings
// use tnsnames.ora entry based on dbname

When the config file is provided as above, the variable $dsn['host'] is set to an empty string. I expect this behaviour to look for a tnsnames.ora entry, not to use as the hostname.

Possible fix:

<pre class="literal">
if (isset($dsn['host']) && $dsn['host']) {


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.