|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
> Driver={SQL Server} That is a very old driver. Does that issue still happen to you with {ODBC driver * for SQL Server}?