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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 - 1 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC