php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47491 Crash when executing a PDO/MYSQL query
Submitted: 2009-02-24 13:30 UTC Modified: 2009-02-25 08:47 UTC
From: pascal dot fellerich at ses-engineering dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.8 OS: Win XP Pro SP3
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: pascal dot fellerich at ses-engineering dot com
New email:
PHP Version: OS:

 

 [2009-02-24 13:30 UTC] pascal dot fellerich at ses-engineering dot com
Description:
------------
PHP crashes when executing a query using PDO/Mysql.
PHP is running as an Apache 2.0 handler.

In the Apache error log, this line appears:
[notice] Parent: child process exited with status 3221225477 -- Restarting.


Sometimes, even the new PDO() call crashes already, but to reproduce the bug easily, just do a SELECT * FROM mysql.user - voila.

Set up: XAMPP 1.7.0 with Apache 2.2.11, PHP 5.2.8, MySQL 5.1.30.
The same crash could be reproduced in a 'bastardized' XAMPP setup with MySQL 5.0.67.
Conversely, the setup Apache 2.2.11, PHP 5.2.6, MySQL 5.1.30 was OK. No crashes here.


Reproduce code:
---------------
$pdo = new PDO("mysql:host=localhost; dbname=mysql", 'root', $mypassword);

$pdo->exec("SET NAMES 'utf8'");

$result = $pdo->query($sql, PDO::FETCH_NUM);

//...bye bye!



Expected result:
----------------
Obvious.

Actual result:
--------------
Apache Error Log:
[notice] Parent: child process exited with status 3221225477 -- Restarting.

Nothing more available.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-24 13:32 UTC] pajoye@php.net
And you use mysql 5.1 right?
 [2009-02-24 13:37 UTC] pascal dot fellerich at ses-engineering dot com
One line of code was missing....

$sql = "SELECT * FROM users";

--- yes, with MySQL 5.1. But the crash also happens when I revert to MySQL 5.0.67
 [2009-02-24 13:40 UTC] pajoye@php.net
Be sure to:

- Have the PHP directory first in your PATH (c:\php) so the php's libmysql.dll is used
- restart your web server

I'm almost 100% sure that it is the reason of the crash (like dozen of other bug reports about the similar problem).
 [2009-02-25 08:47 UTC] pajoye@php.net
Not a php bug, using the right DLL fixed the problem.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 07:01:33 2025 UTC