Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71619 invoked by uid 1010); 13 Oct 2005 16:52:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71603 invoked from network); 13 Oct 2005 16:52:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2005 16:52:01 -0000 X-Host-Fingerprint: 217.8.241.112 ns1.synchromedia.co.uk OpenBSD 3.0-3.4 Received: from ([217.8.241.112:47275] helo=ns1.synchromedia.co.uk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 9B/89-18540-0B09E434 for ; Thu, 13 Oct 2005 12:52:00 -0400 Received: (qmail 26472 invoked by uid 89); 13 Oct 2005 16:51:57 -0000 Received: from unknown (HELO ?10.0.0.1?) (marcus@synchromedia.co.uk@87.74.30.27) by mail.synchromedia.co.uk with SMTP; 13 Oct 2005 16:51:57 -0000 Mime-Version: 1.0 (Apple Message framework v734) Content-Transfer-Encoding: 7bit Message-ID: <2794B48D-7B1B-41AC-B9DA-04210699BD14@synchromedia.co.uk> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: PHP Internals Date: Thu, 13 Oct 2005 17:51:56 +0100 X-Mailer: Apple Mail (2.734) Subject: Globals unavailable, require oddity From: marcus@synchromedia.co.uk (Marcus Bointon) I posted this on general a while ago and the only conclusion anyone could come to is that there's a PHP bug somewhere. I'm running a snap of 5.1 from today on OS X 10.4.2, and I've seen the same symptoms on RedHat EL4. Before I report something does anyone here have any idea what could be amiss here? I have a simple situation: in a.inc.php: in b.class.php: With this pattern, $a is NOT visible within class b, even though it is declared in the global scope and I'm using the global keyword! I can work around it two ways; by changing the original declaration (which just seems wrong - it's already in the global scope at this point): or by requiring the inc file inside each function of b (much less efficient): What's going on here? I feel like I'm going nuts over something so simple. I have another problem with included classes that seems to defy explanation: Fatal error: Class 'Config' not found but the error is from the new, not the require! This class is straight from PEAR, and I have /usr/local/libs/php in my include path which does contain Config.php. If I change the require to something that really doesn't exist, I get (as expected): Fatal error: Failed opening required 'xConfig.php' Is there some "stop_working=true" flag I've left in php.ini? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture marcus@synchromedia.co.uk | http://www.synchromedia.co.uk