ID: 24992 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: WinXP Pro SP1 PHP Version: 4.3.3RC3 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. Thank you for your interest in PHP. Works fine with 4.3.2 and latest CVS. You're just doing something wrong. Please ask support questions elsewhere. Previous Comments: ------------------------------------------------------------------------ [2003-08-08 20:10:21] [EMAIL PROTECTED] Description: ------------ This is kinda hard to explain, but here goes. I have this directory structure: / /htdocs /includes I have a file in /htdocs (index.php) which includes a file (base.class.php) in /includes which in turn includes another file (config.inc.php) in /includes. /includes is in my include_path and so I'm just using: require('file'); Now, the problem seems to be that the variable in config.inc.php (its just a single array of config options) is not visible in base.class.php unless I use a relative path (require('../includes/config.inc.php');) As I say there is no problem when using the relative path and no Fatal Error if I'm not, just the Notice. I haven't had time to come up with a test case (sorry) but if this is indeed a proper bug I felt you might like to fix it before 4.3.3 final is out. I can also confirm this behavior in a snap (4.3.x 200308050430) and 4.3.2 final. I will come up with a test case and also test on FBSD asap (next couple of days is my earliest) Note: there seems to be no problems when there is no nested inclusion involved (i.e. index.php requires footer.inc.php and can access its vars) - Davey Reproduce code: --------------- class base { function base() { require('config.inc.php'); $this->_CONFIG = $_CONFIG; } } Expected result: ---------------- $_CONFIG should be assigned to $this->config Actual result: -------------- Notice: Undefined variable: _CONFIG ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24992&edit=1
