Bug #52942 [Fbk->Opn]: PDO_ODBC with FreeTDS makes php-cgi to crash
| From: | rdjebrouni at orangetango dot com | Date: | Wed, 29 Sep 2010 22:19:45 +0000 |
| Subject: | Bug #52942 [Fbk->Opn]: PDO_ODBC with FreeTDS makes php-cgi to crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-154756@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52942&edit=1
ID: 52942
User updated by: rdjebrouni at orangetango dot com
Reported by: rdjebrouni at orangetango dot com
-Summary: PDO_ODBC with FreeTDS memory leak
+Summary: PDO_ODBC with FreeTDS makes php-cgi to crash
-Status: Feedback
+Status: Open
Type: Bug
Package: ODBC related
Operating System: Mac OS X 10.6
PHP Version: 5.3.3
Block user comment: N
New Comment:
title changed.
PDO_ODBC with FreeTDS memory leak to PDO_ODBC with FreeTDS makes php-cgi
to crash
Previous Comments:
------------------------------------------------------------------------
[2010-09-30 00:18:13] rdjebrouni at orangetango dot com
I found a patch. to run valgrind on mac os x 10.6
==50790== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from
0)
==50790== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from
0)
Full log:
http://pastebin.com/rvusNx36
it seems that it isn't a memory leak problem.
------------------------------------------------------------------------
[2010-09-29 23:47:55] rdjebrouni at orangetango dot com
Valgrind doesn't work on MAC OS X 10.6 (it works only on 10.5).
------------------------------------------------------------------------
[2010-09-29 15:30:34] felipe@php.net
Can you provide a valgrind log?
------------------------------------------------------------------------
[2010-09-28 20:04:56] rdjebrouni at orangetango dot com
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 this bug report at http://bugs.php.net/bug.php?id=52942&edit=1