Bug #64483 [Opn]: PDO fetch method causes server reset
Edit report at https://bugs.php.net/bug.php?id=64483&edit=1
ID: 64483
User updated by: shrimpwagon at yahoo dot com
Reported by: shrimpwagon at yahoo dot com
Summary: PDO fetch method causes server reset
Status: Open
Type: Bug
Package: PDO related
Operating System: Linux 3.2.0-4-686-pae
PHP Version: 5.4.13
Block user comment: N
Private report: N
New Comment:
"AH00052: child pid 5808 exit signal Segmentation fault (11)". Also getting
"zend_mm_heap corrupted"
I'm not the only one having this issue: http://serverfault.com/questions/490061/pdo-odbc-error-just-resets-connection
Previous Comments:
------------------------------------------------------------------------
[2013-03-21 19:30:18] shrimpwagon at yahoo dot com
Description:
------------
I can connect fine. The PDOStatement::fetch method causes a web server connection reset when another
method is called after the PDOStatement::execute method and before the PDOStatement::fetch. See test
script.
- Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian
4.6.3-14) ) #1 SMP Debian 3.2.35-2
- FreeTDS 0.91
- Apache/2.4.4 (Unix) OpenSSL/1.0.1c
- Connecting to a Microsoft SQL Server 2005 - 9.00.5000.00 (X64)
apt-get install freetds-common freetds-dev freetds-bin tdsodbc unixodbc-dev
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --enable-sockets --with-openssl
--with-mysql --with-mcrypt --enable-mbstring --enable-bcmath --enable-calendar --with-curl --with-gd
--with-bz2 --enable-exif --enable-ftp --with-gettext --with-mhash --with-mysqli --enable-soap
--enable-wddx --enable-zip --with-pdo-mysql --with-pdo-odbc=unixODBC,/usr
Test script:
---------------
$db = new PDO('odbc:Driver=FreeTDS; Server=127.0.0.1; Port=1433; Database=mssqldb',
'mssqluser', 'mssqlpass');
$statement = $db->prepare('SELECT * FROM table');
$statement->execute();
$count = $statement->rowCount(); // Comment this line and it works fine. Even
var_dump($statement) will cause the same problem.
$result = $statement->fetch(PDO::FETCH_NUM);
Expected result:
----------------
For fetch to not reset connection and return a proper result
Actual result:
--------------
Server reset.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64483&edit=1
Thread (10 messages)