473,395 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Stack Memory Error

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?

Jan 10 '07 #1
1 1229


On Jan 10, 1:29 pm, "Alex" <alexsi...@gmail.comwrote:
In 2 web hostings (hostinggratisargentina.com and
granjadeservidores.com), both using PHP 4.3 ( .9 and .10 respectively),
I get the strangest error:
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.

Jan 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Andrew | last post by:
Last night I was reading about implementing my own stack. The example given pushes items on and off the stack at the start and end of each procedure (ie. in a std module). What's not so clear is...
17
by: Jonas Rundberg | last post by:
Hi I just started with c++ and I'm a little bit confused where stuff go... Assume we have a class: class test { private: int arr; };
4
by: Gurikar | last post by:
HI, class A() { private: int i; char c; public: A();
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
22
by: bitshadow | last post by:
using the following code, i was able to have my compiler seg fault on me when i gave the argument as anythng greater than 20,832,000bytes. In the case of the struct its 868 instances of said...
9
by: shine | last post by:
what is the difference between a heap and a stack?
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
24
by: arcticool | last post by:
I had an interview today and I got destroyed :( The question was why have a stack and a heap? I could answer all the practical stuff like value types live on the stack, enums are on the stack, as...
16
by: sarathy | last post by:
Hi all, I need a few clarifications regarding memory allocaion in C++. I apologize for the lengthy explanation. 1. In C++, Objects are allocated in heap. What does heap refer to? Is it an area...
13
by: deepak | last post by:
Hi In the following function how the memory 'll be allocated. 1) Will it allocate memory for all the char's together or allocate for first char. then for int then for float and after this only...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.