php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38345 Prepare crashes in function/class
Submitted: 2006-08-05 14:47 UTC Modified: 2006-08-13 01:00 UTC
From: dhodge at regents dot state dot oh dot us Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.1.4 OS: Suse 9
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: dhodge at regents dot state dot oh dot us
New email:
PHP Version: OS:

 

 [2006-08-05 14:47 UTC] dhodge at regents dot state dot oh dot us
Description:
------------
Prepare crashes inside a function or inside a class function. The same statment works outside the function.

Reproduce code:
---------------
$db = new PDO('mysql:dbname=DATABASE;host=HOST', 'USER', 'PASS');
$db_stmnt = $db->prepare('INSERT INTO table(start_date, end_date, title) VALUES (?,?,?)');
print_r($db_stmnt);
exit();

Expected result:
----------------
PDO Object ( ) PDOStatement Object ( [queryString] => INSERT INTO table(start_date, end_date, title) VALUES (?,?,?) ) 

Actual result:
--------------
When in in a function apache crashes and prompts to download the script file. Outside the function you get the expected results.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-05 15:00 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-08-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 18:01:30 2024 UTC