[PEAR-BUG] Bug #18707 [Opn->Dup]: If I specify character set, connection fail

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=18707&edit=1

 ID:               18707
 Updated by:       [email protected]
 Reported By:      wizlong79 at gmail dot com
 Summary:          If I specify character set, connection fail
-Status:           Open
+Status:           Duplicate
 Type:             Bug
 Package:          MDB2_Driver_sqlsrv
 Operating System: Windows 7
 Package Version:  1.5.0b3
 PHP Version:      5.3.6
 Roadmap Versions: 
 New Comment:

-Status: Open
+Status: Duplicate
Bug #18708


Previous Comments:
------------------------------------------------------------------------

[2011-08-04 02:05:54] wizlong

Description:
------------
If I specified character set in the dsn array,

connection was failed and infinite recursion of function call occured.



Test script:
---------------
$dsn = array(
    "phptype"  => "sqlsrv",
    "user"     => "sa",
    "password" => "****",
    "hostspec" => "(local)",
    "database" => "****",
    "charset"  => "utf-8",
);

$db = MDB2::factory($dsn);

Expected result:
----------------
..

Actual result:
--------------
Fatal error: Maximum function nesting level of '100' reached, aborting!
in C:\php\PEAR\MDB2\Driver\sqlsrv.php on line 374

Call Stack:
    0.0009     323976   1. {main}()
D:\workspace\sc_crawl\application\test.php:0
    0.0157    1682584   2. MDB2_Driver_Common->query()
D:\workspace\sc_crawl\application\test.php:22
    0.0157    1682712   3. MDB2_Driver_Common->getConnection()
C:\php\PEAR\MDB2.php:2541
    0.0157    1682712   4. MDB2_Driver_sqlsrv->connect()
C:\php\PEAR\MDB2.php:1749
    0.0157    1682712   5. MDB2_Driver_sqlsrv->_doConnect()
C:\php\PEAR\MDB2\Driver\sqlsrv.php:386
    0.0829    1684992   6. MDB2_Driver_Common->setCharset()
C:\php\PEAR\MDB2\Driver\sqlsrv.php:351
    0.0830    1685208   7. MDB2_Driver_Common->raiseError()
C:\php\PEAR\MDB2.php:2230
    0.0830    1685392   8. MDB2_Driver_sqlsrv->errorInfo()
C:\php\PEAR\MDB2.php:1442

------------------------------------------------------------------------


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18707&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.