Edit report at https://bugs.php.net/bug.php?id=64483&edit=1

 ID:                 64483
 Updated by:         larue...@php.net
 Reported by:        shrimpwagon at yahoo dot com
 Summary:            PDO fetch method causes server reset
-Status:             Open
+Status:             Feedback
 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:

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.

sorry, don't have a mssql server


Previous Comments:
------------------------------------------------------------------------
[2013-03-21 20:26:01] shrimpwagon at yahoo dot com

"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

------------------------------------------------------------------------
[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-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 this bug report at https://bugs.php.net/bug.php?id=64483&edit=1

Reply via email to