php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47463 PHP Crash (CLI) / PHP Access Violation (Browser output)
Submitted: 2009-02-20 11:35 UTC Modified: 2009-03-01 01:00 UTC
From: fabio dot scala at swisscom dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2CVS-2009-02-20 (CVS) OS: Windows Server 2003 SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabio dot scala at swisscom dot com
New email:
PHP Version: OS:

 

 [2009-02-20 11:35 UTC] fabio dot scala at swisscom dot com
Description:
------------
Environment:
Microsoft Windows Server 2003 SP2
PHP 5.2.9RC3-dev (cli) (built: Feb 19 2009 11:40:00)
IIS 6 with ISAPI (already tried FastCGI)

Changes Made to php.ini-dist:
extension=php_pdo.dll
extension=php_pdo_mssql.dll

Error:
Browser Output: PHP has encountered an Access Violation at <Address>
CLI: No output at all, the process just ends/crashes.

Description:
Unfortunately I'm not sure when this happens exactly, I've been able to reproduce it in our web application by always using certain parameters for the same action. It seems to happen when the data fetched from the MSSQL Server increases (more rows fetched = crash).

Sadly we have been having these kind of problems for a year now. Earlier with 5.1.6, now it's 5.2.8. They just seem to pop out of nowhere randomly and most of the times a restart of the IIS is necessary. This Access Violation here is the only one I've been able to *reproduce* (well kinda).

Reproduce code:
---------------
As it's not really a what you can call a *small* web application and it only happens when the SQL statement changes (to return more rows), I wasn't able to reproduce this Error with a small PHP Script.

Expected result:
----------------
-

Actual result:
--------------
DebugDiag CrashHang Report: http://homepage.hispeed.ch/fabioscala/CrashHang_Report__PID_4012__02202009120132378.htm

DebugDiag Memory_Report: http://homepage.hispeed.ch/fabioscala/Memory_Report__PID_4012__02202009120056456.htm

Created on our integration server, the production has different hardware but the same OS. (PHP crashes on both servers of course, meaning it's not a defect RAM/hardware issue.)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-21 11:15 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2009-02-23 14:08 UTC] fabio dot scala at swisscom dot com
I managed to fix the problem by using XDebug. Anyway, it seems that we used bindValue() more than once on the same prepared statement with the same parameter. Once I removed the redundant bindValue() it seemed to work.

$stmt->bindValue(":dateEnd", create_mssql_date_day($dateEnd));
$stmt->bindValue(":dateEnd", create_mssql_date_day($someOtherDate));

Executing works, but PHP crashes after the first fetch().

So actually at least this PHP Access Violation problem is resolved for us (we usually get some in other apps, but I have no clue why yet)

I hope you guys will be able to reproduce this somehow.
 [2009-03-01 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: Wed May 15 16:01:35 2024 UTC