From:             tim at komta dot com
Operating system: Windows XP
PHP version:      5.1.1
PHP Bug Type:     PDO related
Bug description:  Persistent connections + unknown column crashes

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 bug report at http://bugs.php.net/?id=35480&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35480&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=35480&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=35480&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35480&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35480&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35480&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35480&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35480&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35480&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35480&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=35480&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=35480&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35480&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35480&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35480&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35480&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35480&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35480&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35480&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35480&r=mysqlcfg

Reply via email to