php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #13600 fopen wrapper does not work for require/include with windows
Submitted: 2001-10-08 12:17 UTC Modified: 2010-12-17 13:38 UTC
From: stefan dot cano at virtualxs dot com Assigned: pierre (profile)
Status: Closed Package: Filesystem function related
PHP Version: * OS: Windows only
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stefan dot cano at virtualxs dot com
New email:
PHP Version: OS:

 

 [2001-10-08 12:17 UTC] stefan dot cano at virtualxs dot com
This script doesn't work.
<?php
        require("http://localhost/test.php");
?>

When I enter the URL http://localhost/test.php in my browser directly it works.

When I use the following script it works:
<?php
          require("c:/inetpub/wwwroot/test.php");
?>

I checked all rights withing IIS and these are ok.

PHP.ini is configured with defaults.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-08 13:02 UTC] mfischer@php.net
What is 'does not work' ? Be more descriptive, paste error messages, etc.

- Markus
 [2001-10-09 03:51 UTC] stefan dot cano at virtualxs dot com
This script doesn't work, it results in error:
<?php
        require("http://localhost/test.php");
?>

The follow error is generated: Fatal error: Failed opening required 'http://localhost/test.php' (include_path='.;c:\php;c:\php\includes') in c:\inetpub\wwwroot\live3.php on line 2

When I enter the URL http://localhost/test.php in my browser directly it works.

When I use the following script it works:
<?php
          require("c:/inetpub/wwwroot/test.php");
?>

I checked all rights withing IIS and these are ok.

PHP.ini is configured with defaults.
 [2001-10-09 03:53 UTC] derick@php.net
This works fine for me on Linux with PHP 4.0.6

Derick
 [2001-10-09 04:02 UTC] stefan dot cano at virtualxs dot com
That's correct, when I run it on a linux host it works fine.
 [2001-10-09 11:09 UTC] sander@php.net
Reproduced with PHP-4.0.6, Apache 1.3.20 on Win2K.

require("http://localhost/test.php"); // fails
include("http://localhost/test.php"); // fails
fpassthru(fopen("http://localhost/test.php","r")); // works
 [2001-10-09 12:07 UTC] stefan dot cano at virtualxs dot com
PHP-4.0.6, IIS5.0 on Win2K.

fpassthru(fopen("http://localhost/test.php","r")); //works

thanks
 [2001-10-10 14:30 UTC] sander@php.net
Reproduced with latest dev-version from php4win.com (04-Oct-2001).
 [2002-05-08 07:14 UTC] sander@php.net
Sorry to bother you again, but can you try the latest CVS (4.3.0-dev, a non-STABLE build) from http://snaps.php.net?
A lot has changed regarding the fopen-wrappers in 4.3.0 so this might be fixed.
 [2002-06-09 02:44 UTC] mfischer@php.net
Re-opening, update version, os.

This is a limitation of either the way the code is written or Windows. Either way it's not supported, it's a technical issue regarding flex (Zeev says so).

Let's keep this bug open as a reference, mark others duplicate. Should this be critical?
 [2002-06-10 17:48 UTC] mfischer@php.net
Making a feature request.
 [2010-12-17 13:23 UTC] jani@php.net
-Summary: fopen wrapper does not work for require/include +Summary: fopen wrapper does not work for require/include with windows -Package: Feature/Change Request +Package: Filesystem function related -Operating System: Windows +Operating System: Windows only -PHP Version: CVS +PHP Version: *
 [2010-12-17 13:38 UTC] jani@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pierre
 [2010-12-17 13:38 UTC] jani@php.net
Fixed long time ago, at least in PHP 5 series. According to Pierre.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC