Have php crash when processing a lot amounts of data.
tested on PHP v2.3.8 and 2.4.0
for fix problem need to replace this function
// clean up memory due to php5 circular references memory leak... function clear() { $this->dom = null; $this->parent = null; $this->parent = null; $this->children = null; }
on this:
// clean up memory due to php5 circular references memory leak...
function clear()
{
unset($this->dom);
unset($this->parent);
unset($this->parent);
unset($this->children);
}
php version 5.3.8 and 5.4.0 ;)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Thanks alot! I was going crazy with a Segment Fault and this did the jobb!
I cannot add a new comment but only edit an existing one:
I have spend over a day finding my bug. Was writing a script in windows and testing it with xampp. It did not give me a segmentation error. Eventually I installed VMware Player and installed Debian in a virtual machine with apache and mysql. That gave me a segmentation error in the error log which led me to this ticket. Finally I fixed the bug!
Last edit: Anonymous 2014-04-03
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
This actually didn't work for me, but when I removed all the lines from the method it started to work again.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Can confirm. After this update "segmentation fault: 11" & "zend_mm_heap corrupted" errors are gone.
[2012-11-16: Why can I edit this comment but not post a new
one? My question: Is there a test case and has this bug been
reported in the official bug tracker https://bugs.php.net/ ?
If not why not?]
Last edit: Anonymous 2016-01-27
Yes! This solved my problems :) Good call!
Please give me a test case for this (as in a web page that "generally" causes these memory errors, an once I test it, I'll update the code.
However, I note that the newest version of the code has:
function clear()
{
$this->dom = null;
$this->nodes = null;
$this->parent = null;
$this->children = null;
}
Are you using the most current version of the code?
Thanks a lot! Solved my problem!
I am still getting same error (Segmentation fault), using php 5.5 version, with 4 threads.
Last edit: Ivan Vulovic 2014-11-16
Closing because this thread has gone stale. If you still experience issues, please ope a new bug report with a link to this one.