I have an application I'm working on that has different dirs several levels deep, each of them containing a file called var_local.php, which I use to init / set variables. Each var_local.php does a simple include("../var_local.php") at the beginning to grab its parent include file, which allows for each page to "inherit" variables from its parent directory.
It seems that when I have several of these in succession, that the PHP totally dies - I don't even get an error message, the request just seems to time out and I get the usual "unable to connect" type error in my browser.
Can anyone offer some advice? I read somewhere that PHP caches its includes by default, and I wasn't sure if it was getting confused by caching the first var_local.php and then running some kind of infinite loop by always looking for a ../var_local.php. There has to be a way around this... I had tried wrapping each include of var_local.php in a clearstatcache() call but that didn't seem to fix the problem.
Any help would be greatly appreciated - thanks!
-Cliff