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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 05:01:37 2025 UTC