|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48117 while executing a query php crashes and apache does not reply
Submitted: 2009-04-29 22:10 UTC Modified: 2009-05-08 01:00 UTC
From: mucahitkahveci at gmail dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.2.2 OS: Windows XP SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-04-29 22:10 UTC] mucahitkahveci at gmail dot com
when i try to execute a statement in mysql apache crashed. it did always work but does nothing.
The reason i found was i trien the query that couses this in mysql and it gaves an error like this:
ERROR 1364(HY000):Field 'status' does not have a default value

but php crashes when it executes this query.

Reproduce code:
php version:5.2.2
mysql version: 5.0.41
apache version:1.3.37

i have table in like:
CREATE TABLE `hu_properties` (
  `prop_id` int(10) unsigned NOT NULL auto_increment,
  `property` varchar(255) default NULL,
  `user_id` int(10) NOT NULL,
  `generate_date` datetime NOT NULL,
  `generated` int(10) NOT NULL,
  `regenerate_date` datetime default NULL,
  `status` bigint(20) unsigned NOT NULL default NULL,
  PRIMARY KEY  (`prop_id`),
  UNIQUE KEY `property` (`property`)

php code:
$PDO = new PDO( $dsn, 'username', 'password' );
$insertStmt='INSERT INTO hu_properties (property, user_id, generate_date, generated) VALUES (?, ?, NOW(), 1)';
$result=$sth->execute(array('crazy', 1));
if($result) {
  echo 'OK';
} else {

Expected result:
expected to give an error if the $result returns FALSE

Actual result:
apache server crashed (i think waiting reponse from php becouse mysql server works fine at this time)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-30 08:19 UTC]
Please try using this CVS snapshot:
For Windows:

 [2009-05-08 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: Sat Mar 02 00:01:28 2024 UTC