php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19475 Problem using include with files on different domain
Submitted: 2002-09-18 08:28 UTC Modified: 2002-09-18 09:49 UTC
From: greg at tidalflow dot co dot uk Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.2.3 OS: WINXP and LINUX
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: greg at tidalflow dot co dot uk
New email:
PHP Version: OS:

 

 [2002-09-18 08:28 UTC] greg at tidalflow dot co dot uk
It would appear the files can no longer be included from remote servers (i.e. outside of the domain of the file requesting the include)...?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-18 08:31 UTC] derick@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-09-18 09:01 UTC] greg at tidalflow dot co dot uk
Basically... i am writing a php script that includes a file from a remote server. the initial script on 'www.domain1.com' includes a file from 'www.domain2.com'...

include("http://www.domain2.com/inculudeTest.php");

this second script would include <?php echo("TEST"); ?>

Expected Result;
test

Actual Result;
Warning: Failed opening 'http://www.domain2.com/includeTest.php' for inclusion in /blah/cust/4/355/outside/www.domain1.com/testFile.php on line 1

Basically it would appear the inclusion of remote scripts now fails...
 [2002-09-18 09:32 UTC] wez@php.net
Read the docs at:
http://www.php.net/include
There is a note that says:
The Windows version of PHP currently does not support accessing remote files via this function, even if allow_url_fopen is enabled. 

I can't see any reason why we don't allow it under
win32, but that's the way it is.
 [2002-09-18 09:39 UTC] greg at tidalflow dot co dot uk
Sorry I should have been more clear, I tested this on Win XP and then tested also on both of my live linux servers, the problem is consistent on all versions...
 [2002-09-18 09:41 UTC] wez@php.net
And you have allow_url_fopen=on in your php.ini and/or
apache configuration?
 [2002-09-18 09:46 UTC] greg at tidalflow dot co dot uk
ahhh i am sending get variables as well... if i url encode them it seems to work ok... why would non url encoded variables work locally but not remotely, is it the way the wrappers work?
 [2002-09-18 09:49 UTC] wez@php.net
If you are accessing a URL, you need to ensure that the URL is a valid URL :-)

User Error -> Bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 08:01:32 2024 UTC