From: Operating system: Mac OS X 10.6 PHP version: 5.3.3 Package: ODBC related Bug Type: Bug Bug description:PDO_ODBC with FreeTDS memory leak
Description: ------------ - php compiled with no errors with the options: ./configure --prefix=/srv/php-5.3.3 \ --with-pdo-mysql=/srv/mysql-5.1.51 \ --with-pdo-dblib=/srv/freetds-0.82 \ --with-pdo-odbc=unixODBC,/srv/unixodbc-2.3.0 \ --enable-mbstring \ --enable-fastcgi \ --enable-memory-limit \ --enable-discard-path \ --enable-force-cgi-redirect - php runs with mod_fastcgi - The same day I installed the exactly same set up on a Linux Debian Lenny server and everything runs perfectly. Test script: --------------- $usr = 'sa'; $pwd = 'xxx'; $db = 'DBNAME'; $host = 'X.X.X.X'; $port = '1433'; try { $dbh = new PDO('odbc:Driver=FreeTDS; Server=' . $host . '; Port=' . $port . '; Database=' . $db . '; UID=' . $usr . '; PWD=' . $pwd . ';', $usr, $pwd); echo 'PDO_ODBC connected with no errors'; } catch (PDOException $e) { echo $e->getMessage(); } Expected result: ---------------- PDO_ODBC connected with no error Actual result: -------------- >From the apache error log: [Tue Sep 28 13:31:55 2010] [error] [client 127.0.0.1] php-cgi(84874) malloc: *** error for object 0x100a1658b: pointer being freed was not allocated, referer: http://local.dev.XXX/mssql [Tue Sep 28 13:31:55 2010] [error] [client 127.0.0.1] *** set a breakpoint in malloc_error_break to debug, referer: http://local.dev.XXX/mssql -- Edit bug report at http://bugs.php.net/bug.php?id=52942&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52942&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52942&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52942&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52942&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52942&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52942&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52942&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52942&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52942&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52942&r=support Expected behavior: http://bugs.php.net/fix.php?id=52942&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52942&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52942&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52942&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52942&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52942&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52942&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52942&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52942&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52942&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52942&r=mysqlcfg