PHP crashing without an error message?!

Miscellaneous Forums/General Discussion/PHP crashing without an error message?!

GYAHG!

I finally put this web site into its actual host (well, I did it about a month ago), and I just can't solve this stupid problem!
Take a look at this:
http://test.deltahumanesociety.org/
You'll probably notice it's filled with debug text. This is all to get to the bottom of a problem: PHP simply quits at random intervals after knowingly (and properly!) failing to retrieve values via an overloaded __get method!
This isn't just normal crashing, though. It just disappears. No errors, no nothing! It stops writing, and it returns my file in an unfinished state.

The file in its current state (which I could easily change; I'll get to that later) does not show another weird problem: When the __get function outputs its debug text saying that a variable does not exist, if that happens to be the final, fatal call to __get then that variable name generally comes out completely garbled!
This doesn't look like just a conventional coding glitch on my end, though, since if I comment out the variable that it fails with then the error just happens with the next one (even if that next one is 2 If blocks and 30 lines away).
I've also had instances where merely calling up that variable the line before one of those random crashes will stop the crash altogether and the code will move on to crash somewhere else.

Another weird (and irritating, of course) thing is that my debug text, which has no direct connection to the data returned by Output (the debug text is outputted on the spot, while the return values are outputted later) has a huge effect on the eventual crash. If I pull out some debug text, or if I add debug text, the crash happens at a different point.

I actually can not properly explain this problem or even find a pattern; I can only hint at some components of it and hope that maybe you have seen something similar.
I know I'm not giving you much to work with here, but maybe you have seen this somewhere. Any ideas at all would be great, because I am stumped.
(Maybe a full rewrite wouldn't be too bad at this point...).

Also of interest is that the Admin section (please don't mess too much with it!) does not screw up at all... which tells me that the overloaded __get works fine! (And that retrieving default values for variables also works fine).
Here is the PHPInfo for the web site...

Anyhow, any guesses are hugely appreciated!

You have checked the webserver error.log and susexec error log (assuming you use it).

well, first thing that springs to mind is that your PHP version is a few iterations away from current, have you tried searching the PHP4 bugs section to see if something similar has happened to someone else?

Thanks for that suggestion, Indiepath.
Unfortunately I don't have direct access to much (in fact, I can't even use .htaccess files for some reason!) because this could be the worst web host ever, but those may be somewhere in the FTP tree. They've done a nice job of what looks like giving me my own drive partition with my very own file tree (which is read-only, of course, except for that time I accidentally uploaded my whole site to the wrong place and wasn't permitted to remove it), so there's a chance...

Updating would be a good idea... Maybe I can start a revolution over the course of 2 days big enough to convince their techies to keep PHP up to date!

Checking the changelog, I see one possible suspect that was fixed with the version after 4.3.10:
Fixed bug #31106 (Fixed crash in overloaded objects).

Edit: Nope, not that bug. It gives "connection lost", which is not what I'm getting (except right now because it seems my server is down!). I wish I could switch, but it's rather difficult convincing a non-profit community organization to pay more money for a web host.

Edit again:
Alright, it's fixed! It's finally fixed!
I don't know how it's been fixed, but it's good enough for me.
Feels like I should get a prize or something, but all I've done is fix a tiny little bug :(
Damnit, why do all these things have to boil down to single lines of code?!

Anyway... err, Charlotte CMS. Use it because it has a cooler name than PHP-Nuke. (And it creates puzzles that could confound even the world's greatest minds! ... probably).

Original confusion:

Aha! (More nonsense!)
Here is the epitome of my bug.

This is the overloaded __get function used in Page for what was supposed to be an easy way to retrieve values but has at this point turned into "why the hell did you do that?!":
function __get($key, &$value)
		{
			//echo('__GET '.$key);
			if ( isset($this->data[$key]) )
			{
				$value = $this->data[$key];
				return true;
			}elseif ( isset($GLOBALS['def_varsList'][$key]) )
			{
				echo('Getting value for '.$key.' from defaults="'.$GLOBALS['def_varsList'][$key].'"');
				$value = $GLOBALS['def_varsList'][$key];
				return true;
			}else
			{
				//echo('['.$key.'Does not exist!]');
				return false;
			}
		}

If I uncomment echo('['.$key.'Does not exist!]'); near the end of that function, PHP outputs the whole page without any error (though I have huge amounts of debug text and some graphics which I haven't uploaded yet).
This makes no sense!. Echoing should have no impact - especially not a positive impact! The __get function merely sets $value to the output or says a variable does not exist.
Can't really file a bug, since PHP here is out of date. I guess I have a decent question for the support folks now, though, and a better description of this bug.

However, if I uncomment echo('__GET '.$key);, then it breaks echoing the Summary of the Volunteer section (from retrieving the Path variable, which is not stored within the $data array but PHP should get automatically).


Edit:
Okay, I have whittled this down a bit further. If I replace echo('['.$key.'Does not exist!]'); with $value=$key; or anything else that involves retrieving the value of $key at that point in the function, it works.
This does not explain why retrieving the value of $key earlier (at the top of the function) breaks it, or, for that matter, why this needs to be done at all (or what retrieving the value of a local variable has to do with the eventual output! ...Is the function overloading itself?).