|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35732 Access violation on file open
Submitted: 2005-12-19 13:04 UTC Modified: 2005-12-30 01:00 UTC
Avg. Score:4.8 ± 0.6
Reproduced:11 of 11 (100.0%)
Same Version:5 (45.5%)
Same OS:8 (72.7%)
From: rene at lico dot nl Assigned:
Status: No Feedback Package: IIS related
PHP Version: 5CVS-2005-12-20 (snap) OS: Windows 2003
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.
Block user comment
Status: Assign to:
Bug Type:
From: rene at lico dot nl
New email:
PHP Version: OS:


 [2005-12-19 13:04 UTC] rene at lico dot nl
Using PHP as ISAPI module results in getting "PHP has 
encountered an Access Violation at ...".

The cause of this access violation is quite unknown to me and 
I have no idea how to debug this error.

What I have found is that it _could_ happen on a 
file_get_contents or a fopen using the http wrapper. But 
again: i'm not sure.

First of all: please help me in tracing down this problem.

Reproduce code:
<? print file_get_contents("http://localhost"); ?>

Expected result:
not the actual result :)

Actual result:
PHP has encountered an Access Violation at 010E2ED6


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-21 14:53 UTC] rene at lico dot nl
Tried the win32-latest and still the same error.

It seems to work for a while before 1 requests took a long 
time and finally did nothing.

Php stil works for pages that don't access a file the 
way the example does.

Any suggestions for debugging?
 [2005-12-21 15:19 UTC]
Well, if you have some debugging tools installed, this link
should be useful.
 [2005-12-21 16:12 UTC] rene at lico dot nl
I would try the develpack if i had MSVC6, but i don't. What to 

Is there a seperate download to only have the debug functions?

I will try to make a seperate script that raises the 
 [2005-12-21 16:20 UTC]
If you have this:

<? print file_get_contents("http://localhost"); ?>

Is the content of this file in same file which is outputted?

 [2005-12-21 17:39 UTC] rene at lico dot nl
No, the localhost could also be replaced with something else 
like an asp scripts (what it is used for in my case)
 [2005-12-21 21:15 UTC]
Can you reproduce this using some other web server, like Apache?
 [2005-12-22 14:08 UTC] rene at lico dot nl
I can't find the exact cause. If the error has occoured it 
wil again do so when the <? print file_get_contents("http://
localhost"); ?> is executed. I've tried to get the error 
only using file_get_contents, but that dind't work out.

This also means I can't get it to happen on apache.

Note that the website I use here uses both asp and php 
files. The complete site can't be copied to an apache 

I've found sombody who has visual c so we're installing 
everything else on his pc. I hope this results in something 
more. I'll keep you updated on this, but I think it will be 
next year; since I'm on holiday for the next week.
 [2005-12-22 14:17 UTC]
Do you have the asp tags enabled in php.ini ?
 [2005-12-22 14:20 UTC] rene at lico dot nl
no. IIS is also configured to use the php engine only on .php 
and asp engine only on .asp and .inc
 [2005-12-22 14:33 UTC]
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 possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

 [2005-12-22 14:37 UTC] rene at lico dot nl
I'm not yet able to reproduce the problem by using a seperate 
peace of code. I will post it here when I can reproduce it
 [2005-12-30 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".
 [2006-09-13 09:37 UTC] kaliantow at mediasphere dot com dot au
I want to add, I experienced 'PHP encounter Access Violation' since I upgraded from PHP 4.x to 5.1.4, then downgrade to 5.0.3, the problem went away for a while, but after two weeks of monitoring it happened again.

I download from the snapshots PHP 5.2( It didn't happen for a while, then it happened again but not that often as version 5.1.4 and 5.0.3,
It only happen when running phpMyAdmin and insert bulk data...
 [2007-02-06 19:15 UTC] nathanb at lawtonprinting dot com
I have noticed that my PHP pages have started to print this same error.  All of the errors seem to be at the same address.  I can refresh the page and it will go away but 1-10 refreshes later it will come up again.  This is the first I have encountered this problem using IIS 6, Win2k3, PHP 5.1.6.  During testing and initial release I had no problems with Access Violation errors.  I am starting to wonder if it is a corrupted dll or something of that nature.  I will be reinstalling to see if that fixes the issue.  I have no code examples to contribute at this time, there is a lot to dig through to find potential problems.
 [2007-02-08 18:59 UTC] charlie at cdomedia dot com
I also have this problem (on IIS) when using the HTTP wrapper for fopen or file_get_contents.  It's tough to find a solid repro when I can't even get the error to go away... but it's definitely in the HTTP wrapper.
 [2007-04-23 22:06 UTC] sfreeman at intellicominc dot com
I am running Windows 2003 Server and just upgraded PHP to v5.2.1 and am now seeing this error as well.  For testing purposes I allowed full permission to the Everyone group on the PHP folder and all sub-folders and files.  This is the code I'm using in index.php
Sometimes I can browse to it and it works fine other times it will throw the permission error.  If I refresh the error it usually works but when I refresh again I could get the error.

Any help would be greatly appreciated.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 27 01:01:28 2024 UTC