#35480 [Opn->Asn]: Persistent connections + unknown column crashes

From: Date: Tue, 29 Nov 2005 22:09:53 +0000
Subject: #35480 [Opn->Asn]: Persistent connections + unknown column crashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-89425@lists.php.net to get a copy of this message
ID: 35480 Updated by: tony2001@php.net Reported By: tim at komta dot com -Status: Open +Status: Assigned Bug Type: PDO related Operating System: Windows XP PHP Version: 5.1.1 -Assigned To: +Assigned To: georg New Comment: Georg, this seems to be the same issue caused by protocol binary incompatibility. Previous Comments: ------------------------------------------------------------------------ [2005-11-29 23:04:24] tim at komta dot com Oops, sorry about that, it's MySQL 5.0.15 ------------------------------------------------------------------------ [2005-11-29 21:55:05] tony2001@php.net And what MySQL version? ------------------------------------------------------------------------ [2005-11-29 21:10:03] tim at komta dot com Description: ------------ Using a persistent connection with PDO (mysql tested) and then executing a query with an unknown column will crash PHP 5.1.1, and take Apache with it. This has been reproduced on two seperate systems here at the office already. Both systems use Apache 2.0.54 as a module, with PHP 5.1.1 Reproduce code: --------------- <?php $pdo = new PDO('mysql:host=HOST;dbname=mysql', USER, PASSWORD, array(PDO::ATTR_PERSISTENT => TRUE)); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $pdo->query('SELECT frank FROM mysql.user LIMIT 20'); ?> Expected result: ---------------- Expect a warning, such as Warning: PDO::query() [function.query]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'frank' in 'field list' in C:\Documents and Settings\Tim\workspace\hxpa SVN\temp.php on line 5 Actual result: -------------- PHP (Apache is reported) crashes. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35480&edit=1

« previous php.bugs (#89425) next »