#44790 [Opn->Bgs]: http based Include and Classes
| From: | colder@php.net | Date: | Sun, 20 Apr 2008 23:57:05 +0000 |
| Subject: | #44790 [Opn->Bgs]: http based Include and Classes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-124398@lists.php.net to get a copy of this message | ||
ID: 44790
Updated by: colder@php.net
Reported By: jeff_cygnus at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Win32
PHP Version: 5.2.5
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-04-20 23:52:02] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44790&edit=1