Bug #73879 [Opn->Fbk]: USE_ZEND_ALLOC=0 PDOStatement exits with "Out of memory" for empty results
| From: | ab@php.net | Date: | Sun, 08 Jan 2017 13:05:01 +0000 |
| Subject: | Bug #73879 [Opn->Fbk]: USE_ZEND_ALLOC=0 PDOStatement exits with "Out of memory" for empty results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206393@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73879&edit=1
ID: 73879
Updated by: ab@php.net
Reported by: c dot schiffler at cyberspectrum dot de
Summary: USE_ZEND_ALLOC=0 PDOStatement exits with "Out of
memory" for empty results
-Status: Open
+Status: Feedback
Type: Bug
Package: PDO MySQL
Operating System: Debian testing
PHP Version: 7.0.14
Block user comment: N
Private report: N
New Comment:
Thanks for the report. Please either use Opcache or Xdebug, not both together. Best is probably even
to unload both, depending on what exactly you're debugging.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-01-06 11:03:07] c dot schiffler at cyberspectrum dot de
Description:
------------
I am using USE_ZEND_ALLOC=0 for debugging PDO
This bug somewhat relates to https://bugs.php.net/bug.php?id=73370, however it
is pretty severe as it makes PDO unusable with "USE_ZEND_ALLOC=0".
PDOStatement exits the PHP process with "Out of memory" when executing ANY query that
returns an empty result set.
No exception, warning or anything else is raised.
Calling the same script with "USE_ZEND_ALLOC=1" fixes the problem but is not intended as
it prevents to debug PDO without memory manager.
System environment:
$ php -v
PHP 7.0.14-2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.14-2, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
Test script:
---------------
$dbh = new \PDO('mysql:dbname=test;host=localhost', 'test', 'test');
$dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
$stmt = $dbh->prepare('SELECT * FROM test WHERE 1=2');
$stmt->execute();
Expected result:
----------------
The execute method should return true as the query is valid and has correctly been processed by
MySQL.
Actual result:
--------------
The PHP process writes "Out of memory" to STDERR and exits with status 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73879&edit=1