php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44790 http based Include and Classes
Submitted: 2008-04-20 23:52 UTC Modified: 2008-04-20 23:57 UTC
From: jeff_cygnus at hotmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.5 OS: Win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jeff_cygnus at hotmail dot com
New email:
PHP Version: OS:

 

 [2008-04-20 23:52 UTC] jeff_cygnus at hotmail dot com
Description:
------------
I have a very simple program that works perfect if I use 

require_once("gateway.php")

However if I change it to:

require_once("http://localhost/gateway.php")

it does not work.

Yes I have allow_url_includes turned on.

And yes I can see the file being opened by Apache and it is opening all the subordinate includes that are contained within gateway.php.





Reproduce code:
---------------
Test.php

<?php

require_once("http://localhost/gateway.php");

$services = new GatewayServices();

$function = $_REQUEST["method"];

$xml = $services->{$function}($_REQUEST);

?>


Gateway.php File

<?php

class GatewayServices {

	function test($params){
		
		return "<XML Success=Ok/>";
	}
}
?>



Expected result:
----------------
http://localhost/index.php?method=test

Should produce

<XML Success=Ok />



Actual result:
--------------
Class GatewayServices does not exist.

If you change the require_once to:

require_once("gateway.php") it works.

And Yes it needs to be able to work both ways for Load Balancing and failover reasons.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-20 23:57 UTC] colder@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC