Hello,
when using the "find" method on some pages (765 rows in HTML source), Apache segfaults with message:
httpd(59087) malloc: mmap(size=18446744071562072064) failed (error code=12)
error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Is this a configuration issue or is it related to the PHP Simple HTML lib?
Code:
$source_url = 'http://www.domain.com/index';
$html = file_get_html($source_url);
foreach ($html->find('h2') as $e) {
var_dump($e);
}
Using:
Server version: Apache/2.2.22 (Unix)
Server built: Jul 12 2012 15:11:26
PHP 5.3.15 with Suhosin-Patch (cli) (built: Jul 31 2012 14:49:18)
MacOS X 10.7.5
MacBook Pro 5,1 8Go RAM
Thks a lot,
Axel
Closing because this is a very old issue with outdated software. The code you posted should work fine, so this was probably a configuration issue or a bug in Apache or PHP.