php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63306 PDO_ODBC: $stmt->fetchAll() then PHP/ Apache crashed
Submitted: 2012-10-18 14:23 UTC Modified: 2020-10-11 04:22 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: mikeyap2005 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: PDO ODBC
PHP Version: 5.3.17 OS: windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mikeyap2005 at gmail dot com
New email:
PHP Version: OS:

 

 [2012-10-18 14:23 UTC] mikeyap2005 at gmail dot com
Description:
------------
when i call $stmt->fetchAll() then PHP/ Apache crashed,thereafter browser will ask download the script file.

sql is "SELECT data_x FROM sysuser" , datatype of the data_x is text, crashed only when the select statement contain field which is text datatype.

i'm using MSSQL 2008 R2 Express

It is crashed for PHP version 5.3.13 and 5.3.14 either 
i use zend server or using wamo or setup my own server ,
 however it is ok for PHP version 5.3.8 and 5.2.x.

Test script:
---------------
$conn = new PDO('odbc:Driver={SQL Server};Server=SERVERNAME;Database=DATABASE;','USERID', 'USERPASSWORD');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$_sql = "SELECT data_x "; // please make sure the data type is "text"
$_sql.= " FROM gmcmm_user";

$stmt = $conn->prepare($_sql);
$stmt->setFetchMode(PDO::FETCH_ASSOC);

$stmt->execute();

var_dump($stmt->fetch()); // this line will caused the crash



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-18 14:26 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2012-10-18 14:26 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2012-10-18 14:55 UTC] mikeyap2005 at gmail dot com
-Status: Feedback +Status: Open
 [2012-10-18 14:55 UTC] mikeyap2005 at gmail dot com
the debug pack for php 5.3.17 is 0 mb

http://windows.php.net/snapshots/

sorry, this is my first time to debug php
 [2012-10-18 15:38 UTC] laruence@php.net
Pierre, could you please look at this ? the debug package is 0 size
 [2012-10-18 15:38 UTC] laruence@php.net
-Assigned To: +Assigned To: pajoye
 [2012-10-18 19:22 UTC] pajoye@php.net
-Status: Assigned +Status: Open -Assigned To: pajoye +Assigned To:
 [2012-10-18 19:22 UTC] pajoye@php.net
Check latest rev here: http://windows.php.net/downloads/snaps/php-5.3/r7aed21c/

there is a bug about the html page, which has to be fixed so it gets the right 
links again
 [2012-10-19 00:42 UTC] sixd@php.net
-Status: Open +Status: Feedback
 [2012-10-19 06:26 UTC] mikeyap2005 at gmail dot com
-Status: Feedback +Status: Open
 [2012-10-19 06:26 UTC] mikeyap2005 at gmail dot com
Thread 0 - System ID 9268
Entry point   php_cgi!php_graceful_shutdown+3a5a 
Create time   18/10/2012 3:23:05 PM 
Time spent in user mode   0 Days 0:0:19.468 
Time spent in kernel mode   0 Days 0:0:3.666 






Full Call Stack



Function     Arg 1     Arg 2     Arg 3     Arg 4   Source 
php5!zend_register_internal_class_ex+ad0     01096bf8     000005f0     01096bf8     019b0918    
php5!zend_mm_set_custom_handlers+26d     000005e2     019b05a0     00000000     000005e1    
php5!zend_mm_set_custom_handlers+1048     019b05a0     000005e2     019afff0     030a2d24    
php5!erealloc+25     019b05a0     000005e2     00000000     019b00e0    
php_pdo_odbc+2d24     019afc38     00001000     00c0ca30     00c0ca44    
php5!php_pdo_stmt_delref+2266     019ae808     019afc38     00000000     00000000    
php5!zend_parse_parameters+5a     00000000     00000000     00000000     00000000
 [2012-10-24 04:45 UTC] mikeyap2005 at gmail dot com
Hi, any update for this bug ?
 [2013-06-12 02:15 UTC] ssufficool@php.net
-Summary: $stmt->fetchAll() then PHP/ Apache crashed +Summary: PDO_ODBC: $stmt->fetchAll() then PHP/ Apache crashed
 [2014-01-01 12:35 UTC] felipe@php.net
-Package: PDO related +Package: PDO ODBC
 [2020-09-28 13:43 UTC] cmb@php.net
> Driver={SQL Server}

That is a very old driver.  Does that issue still happen to you
with {ODBC driver * for SQL Server}?
 [2020-09-28 13:43 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-10-11 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 13:01:29 2024 UTC