#38345 [Opn->Fbk]: Prepare crashes in function/class
| From: | iliaa@php.net | Date: | Sat, 05 Aug 2006 15:00:11 +0000 |
| Subject: | #38345 [Opn->Fbk]: Prepare crashes in function/class | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100388@lists.php.net to get a copy of this message | ||
ID: 38345
Updated by: iliaa@php.net
Reported By: dhodge at regents dot state dot oh dot us
-Status: Open
+Status: Feedback
Bug Type: PDO related
Operating System: Suse 9
PHP Version: 5.1.4
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2006-08-05 14:47:17] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38345&edit=1