Stack Memory Error

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
In 2 web hostings ( and, both using PHP 4.3 ( .9 and .10 respectively),
I get the strangest error:

Apparently, after using too much space in local variables, php just
uses the same memory space for the variables, assignment stops working,
and, well, everything fails.

function renderEcho() {


        if ($x[0]!=22) {echo 'DIFFERENT!'; debug_zval_dump($x);} else

                foreach (array_keys($this->childNodes) as $k) {

Here's some output:

DIFFERENT!string(5) "2alue" refcount(3) DIFFERENT!string(5) "2alue"
Warning: Cannot use a scalar value as an array in .../XMLNode.class.php
on line 100 (the assignment)
DIFFERENT!NULL refcount(1)

As you can see, sometimes it has a string, (which I think it should be
"value"), later it has NULL, and it never has an array.

I removed some temporary variables in someplaces and I got my script to
go further, but it still fails.

This problem does not exist in my ubuntu edgy PC (PHP 4.4.2-1.1). Any
ideas how to solve this?

Re: Stack Memory Error

Quoted text here. Click to load it

Well, apparently the problem was misuse of references in PHP 4.3. Using
PHP 4.4, I found all of the "Notice: Only variable references should be
returned by reference" in my code and that solved it.

Site Timeline