php.net |  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
Votes:1
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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.

Procedure:
1.step:
There is a php-script that includes a second php-file using the function include ().
2.step:
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.

Thankyou!

Best regards,
Rudolf Staribacher

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-15 06:25 UTC] mfischer@php.net
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 http://snaps.php.net/win32/php4-win32-200206150200.zip ?
 [2002-07-15 18:47 UTC] r dot staribacher at hypercms dot com
Hello!

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.: 
<?php
....
include ("http:/www.test.net/testscript.php");
....
?>

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

<?php
....
$data = file ("http:/www.test.net/testtext.txt");
....
?>


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

<?php
....
include ("testscript.php");
....
?>


testscript.php:
<?php
....
$data = file ("http:/www.test.net/testtext.txt");
....
?>

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

Thankyou!

Best regards,
Rudolf Staribacher

PS: The link you gave me (http://snaps.php.net/win32/php4-win32-200206150200.zip), seems to be not correct.
 [2002-07-15 19:06 UTC] philip@php.net
Win32 does not allow include() via http.  The documentation mentions this in php.net/include 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 &warn.no-win32-fopen-wrapper;, is used throughout the docs now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC