php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11396 URL fopen() wrappers don't work on include()
Submitted: 2001-06-11 05:45 UTC Modified: 2001-06-12 15:30 UTC
From: mwhite at madriver dot k12 dot oh dot us Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.5 OS: Windows 2000
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: mwhite at madriver dot k12 dot oh dot us
New email:
PHP Version: OS:

 

 [2001-06-11 05:45 UTC] mwhite at madriver dot k12 dot oh dot us
This snippet of code works on FreeBSD, but not Windows 2000:

<? include("http://www.bunnynet.org"); ?>

On FreeBSD it works as expected, PHP will connect to the remote host, fetch the page and include it in the page it's currently sending to the client.

On Windows 2000 I get the following error:

Warning: Failed opening 'http://www.bunnynet.org' for inclusion (include_path='') in c:\apache\htdocs\test.php on line 14

I am using PHP 4.0.5 on the FreeBSD server and PHP 4.0.6 RC3 on the Windows 2000 server.

My php.ini is identical to php.ini-dist in 4.0.6 RC3, and is located in C:\WINNT\, which is the path that phpinfo() shows that PHP is looking for it in. ("allow_url_fopen" IS enabled.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-12 15:30 UTC] jmoore@php.net
This is the expected behaviour, include and require are lang consturcts not functions, use readfile for the functionality you want.

- James
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 01:01:27 2025 UTC