You are here: Stack Memory Error « PHP Programming Language « IT news, forums, messages
Stack Memory Error

Posted by Alex on 01/10/07 16:29

In 2 web hostings (hostinggratisargentina.com and
granjadeservidores.com), 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() {

$x[0]=22;

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

[...]
foreach (array_keys($this->childNodes) as $k) {
$this->childNodes[$k]->renderEcho();
}
}

Here's some output:

DIFFERENT!string(5) "2alue" refcount(3) DIFFERENT!string(5) "2alue"
refcount(3)
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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация