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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 09 11:01:23 2021 UTC