|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17770 PHP problems with include() via http
Submitted: 2002-06-15 05:06 UTC Modified: 2002-07-15 19:06 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: r dot staribacher at hypercms dot com Assigned:
Status: Closed Package: *Web Server problem
PHP Version: 4.2.1 OS: Win32
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: r dot staribacher at hypercms dot com
New email:
PHP Version: OS:


 [2002-06-15 05:06 UTC] r dot staribacher at hypercms dot com
I'm using Win98 SE and PWS with PHP 4.2.1. 
No additional modules in use.

There is a php-script that includes a second php-file using the function include ().
the second php-file itself loads a text-file using the function file().

The first step works well, but in connection with the second step (loading the text-file) the MS-PWS crashed. If you just perform step 2 it will work. Are there any problems with nested php-scripts which try to load another external file? Also other functions like readfile () causes the same problem.
Please note: This problem doesn't occur on Linux and Apache.


Best regards,
Rudolf Staribacher


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-15 06:25 UTC]
Can you please try the following:

1) is this true for w2k too? Many problems reported with '98 are related to the specific OS and aren't valid for W2k and equal systems
2) Can you try ?
 [2002-07-15 18:47 UTC] r dot staribacher at hypercms dot com

Sorry, it took such a long time. But now I could test the script on Win 2K. The same problem occurs, so it's not only a Win 98 related problem.

Same procedure:
I call a PHP-script via IE 5.0 Browser (don't matters which browser is in use). This script includes another PHP-script via http-request using the function include(). 
And the second PHP-script loads a file via http using the function file(). If you try the same operating on local file system it will work! But trying to use http
on Win OS will cause an error, don't matters if you are using Apache, IIS or PWS.   

So e.g.: 
include ("http:/");

Will result to an error, if the testscript.php tries to load another file:

$data = file ("http:/");

This will work! Note: the include() will not use http!

include ("testscript.php");

$data = file ("http:/");

Maybe you can help me!
As I already told, this problem won't occure on Linux.


Best regards,
Rudolf Staribacher

PS: The link you gave me (, seems to be not correct.
 [2002-07-15 19:06 UTC]
Win32 does not allow include() via http.  The documentation mentions this in as of a month ago, and has been in 'remote files' section for a long while.  Here's the <warning>:

"The Windows version of PHP currently does not support remote file accessing for this function, even if allow_url_fopen is enabled."
This entity, called &;, is used throughout the docs now.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Dec 05 04:01:27 2023 UTC