php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42485 allow_url_fopen and allow_url_include dont work fine
Submitted: 2007-08-30 12:02 UTC Modified: 2007-08-30 12:03 UTC
From: marciomaianunes at hotmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.2.3 OS: windos xp
Private report: No CVE-ID: None
 [2007-08-30 12:02 UTC] marciomaianunes at hotmail dot com
Description:
------------
With the parameters "allow_url_fopen" = "on" and "allow_url_include" = "on" I can include URL like files, but I cannot declare the classes and cannot use the functions declared in the include file...

Reproduce code:
---------------
/* FILE PHPbug.php */
<?php
// "allow_url_fopen" and "allow_url_include" is "on"
define("DIR", "http://localhost:8080/MyClass.php");

require_once(DIR);

$bug = new MyClass(); 	//ERROR, dont found the class...
echo $bug->getNumber();
echo "<br>";
echo callFunction();	//ERROR, dont found the function...
?>

/* FILE MyClass.php */
<?php
class MyClass {
	
   public function getNumber() { return 100; }
}
function callFunction() { return "ok";}
?>

Expected result:
----------------
I expect...

100
ok

Actual result:
--------------
Fatal error: Class 'MyClass' not found in C:\MARCIO\public_html\PHPbug.php on line 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-30 12:03 UTC] jani@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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC