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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jakoch at web dot de
New email:
PHP Version: OS:

 

 [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: Fri Dec 27 00:01:30 2024 UTC