From:             shawnhausser at yahoo dot com
Operating system: Linux 3.2.0-4-686-pae
PHP version:      5.4.13
Package:          PDO related
Bug Type:         Bug
Bug description:PDO fetch method causes server reset

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-ker...@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 bug report at https://bugs.php.net/bug.php?id=64483&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64483&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64483&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64483&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64483&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64483&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64483&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64483&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64483&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64483&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64483&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64483&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64483&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64483&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64483&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64483&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64483&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64483&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64483&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64483&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64483&r=mysqlcfg

Reply via email to