php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37832 Crashes using $Db->exec instead of $Db->query
Submitted: 2006-06-17 13:13 UTC Modified: 2006-06-17 13:16 UTC
From: jakoch at web dot de Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.1.4 OS: WinXP
Private report: No CVE-ID: None
 [2006-06-17 13:13 UTC] jakoch at web dot de
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!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-17 13:16 UTC] jakoch at web dot de
bogus, found error in exception handler.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC