#37832 [NEW]: Crashes using $Db->exec instead of $Db->query
| From: | jakoch at web dot de | Date: | Sat, 17 Jun 2006 13:13:41 +0000 |
| Subject: | #37832 [NEW]: Crashes using $Db->exec instead of $Db->query | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-98438@lists.php.net to get a copy of this message | ||
From: jakoch at web dot de
Operating system: WinXP
PHP version: 5.1.4
PHP Bug Type: PDO related
Bug description: Crashes using $Db->exec instead of $Db->query
Description:
------------
this bug was found accidently using the wrong pdo command:
exec instead of query!
the use of exec crashes the apache.
an errormessage should be given, reporting of the wrong command use at
this position.
Reproduce code:
---------------
$table = "SELECT session_id FROM ". DB_PREFIX ."session ";
$where = "WHERE session_id='$session'";
FALSE:
$session_id = $Db->exec($table.$where);
RIGHT:
$session_id = $Db->query($table.$where);
Expected result:
----------------
throw out errormessage!
Actual result:
--------------
crash of apache!
--
Edit bug report at http://bugs.php.net/?id=37832&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37832&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37832&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37832&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37832&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37832&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37832&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37832&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37832&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37832&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37832&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37832&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37832&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37832&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37832&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37832&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37832&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37832&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37832&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37832&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37832&r=mysqlcfg