ZF-2347: Pdo_Mssql fails when using PDO_DBLIB and a non-standard port

Issue Type: Bug Created: 2007-12-21T18:57:35.000+0000 Last Updated: 2008-02-26T12:56:08.000+0000 Status: Resolved Fix version(s): - 1.0.4 (26/Feb/08)

Reporter: C Snover (snover) Assignee: Thomas Weidner (thomas) Tags: - Zend_Db

Related issues: Attachments:


Pdo_Mssql fails when using a non-standard port because the incorrect DSN syntax is used.

Lines 91-94:

<pre class="highlight">
        if (isset($dsn['port'])) {
            $dsn['host'] .= ',' . $dsn['port'];

The fix here is trivial: instead of using a comma to separate the host and port, use a colon. I don't know if this will affect any of the other DSN prefixes that DBLIB supposedly provides; the version I have is compiled against FreeTDS and it only exposes 'dblib' to PHP (in PDO::getAvailableDrivers), so maybe this is the only DSN now that PDO_DBLIB is Version 1.0.



Posted by Thomas Weidner (thomas) on 2007-12-28T17:28:18.000+0000

There is only one thing to mention:

I integrated the "," because on windows only the comma works. Colon does not work on windows systems. So we can not just simply change comma to colon.

If comma does not work on *nix systems, then we will also have to take in place that it depends on the environment.

Posted by C Snover (snover) on 2007-12-28T18:39:13.000+0000

It would seem to need to be an environment condition then, since indeed this testing was done on Linux (using FreeTDS).

Posted by Thomas Weidner (thomas) on 2008-01-17T15:00:13.000+0000

Fixed with revision 7474. Works now OS independent.

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.