php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52942 PDO_ODBC with FreeTDS makes php-cgi to crash
Submitted: 2010-09-28 20:04 UTC Modified: 2011-11-16 14:15 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: rdjebrouni at orangetango dot com Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 5.3.3 OS: Mac OS X 10.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 42 = ?
Subscribe to this entry?

 
 [2010-09-28 20:04 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-29 15:30 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2010-09-29 15:30 UTC] felipe@php.net
Can you provide a valgrind log?
 [2010-09-29 23:47 UTC] rdjebrouni at orangetango dot com
Valgrind doesn't work on MAC OS X 10.6 (it works only on 10.5).
 [2010-09-30 00:18 UTC] 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-30 00:19 UTC] 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
 [2010-09-30 00:19 UTC] rdjebrouni at orangetango dot com
title changed.
PDO_ODBC with FreeTDS memory leak to PDO_ODBC with FreeTDS makes php-cgi to crash
 [2010-09-30 00:27 UTC] rdjebrouni at orangetango dot com
sorry I did something wrong the first time.

==50891== ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)

Full log: 
http://pastebin.com/rL9MBHXZ
 [2011-11-16 14:15 UTC] felipe@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

It looks a library issue, try a newer version.
 [2011-11-16 14:15 UTC] felipe@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC