ID: 35480
User updated by: tim at komta dot com
Reported By: tim at komta dot com
-Status: Feedback
+Status: Open
Bug Type: PDO related
Operating System: Windows XP
PHP Version: 5.1.1
New Comment:
Oops, sorry about that, it's MySQL 5.0.15
Previous Comments:
------------------------------------------------------------------------
[2005-11-29 21:55:05] [EMAIL PROTECTED]
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