php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45857 Apache crashes with Prepared Statements
Submitted: 2008-08-19 07:41 UTC Modified: 2008-10-26 01:00 UTC
From: hawk_master at web dot de Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2.6 OS: Win XP Prof
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: hawk_master at web dot de
New email:
PHP Version: OS:

 

 [2008-08-19 07:41 UTC] hawk_master at web dot de
Description:
------------
On my Win XP Prof System with Apache 2.2.9 and PHP 5.2.6 Apache will crashes every time I run my PHP script which includes a Prepared Statement and "bindParam"
If I replace the code without "bindParam" all is fine.

Reproduce code:
---------------
$dbUpdateUserLdap = $DBO->prepare("UPDATE table_user SET AddressField1 = :address1, AddressField2 = :address2', pwd = :pwd, AddressField3 = :address3 WHERE usr = :user");
$dbUpdateUserLdap->bindParam(':user', $loginname);
$dbUpdateUserLdap->bindParam(':pwd', $_POST['PWD']);
$dbUpdateUserLdap->bindParam(':address1', $address1);
$dbUpdateUserLdap->bindParam(':address2', $address2);
$dbUpdateUserLdap->bindParam(':address3', $address3);
$dbUpdateUserLdap->execute();

This same code without "bindParam" will run:

$sql = "UPDATE table_user SET AddressField1='$address1' , AddressField2='$address2' , pwd='$_POST[PWD]', AddressField3='$address3' WHERE usr='$loginname'";
$result = $DBO->exec($sql);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-19 18:12 UTC] johannes@php.net
Which database driver are you using and what kind of "crash" are you getting?
 [2008-08-27 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".
 [2008-10-18 20:12 UTC] felipe@php.net
Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/


 [2008-10-26 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: Thu Jul 17 01:01:33 2025 UTC