From: jeff_cygnus at hotmail dot com Operating system: Win32 PHP version: 5.2.5 PHP Bug Type: Class/Object related Bug description: http based Include and Classes
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 bug report at http://bugs.php.net/?id=44790&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44790&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44790&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44790&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44790&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44790&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44790&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44790&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44790&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44790&r=support Expected behavior: http://bugs.php.net/fix.php?id=44790&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44790&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44790&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44790&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44790&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44790&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44790&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44790&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44790&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44790&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44790&r=mysqlcfg