|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-02-02 13:20 UTC] tony2001@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
Description: ------------ when iterating through a dir structure the apache process serving this script crashes with 'child pid XY exit signal Segmentation fault (11)' when trying to execute getPath method Reproduce code: --------------- function test_apache_segfault() { $diriter = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('.') ); foreach ($diriter as $key => $file) { echo($file->getFilename()); flush(); echo(' 1'); flush(); // 'child pid XY exit signal Segmentation fault (11)' echo($file->getPath()); // <-- crash here echo(' 2'); flush(); } // foreach echo(' end'); flush(); } Expected result: ---------------- a list of more than one entry and the word 'end' at the end Actual result: -------------- output ends after the 'echo 1' when commenting out the line with 'getPath' this function runs till the end. checked this with - apache 2.0.53 and php 5.0.4 both compiled by myself - apache 2.2.0 and php 5.1.2 both compiled by myself - apache 2.2.0 and php 5.1.3-dev (2006-02-02 snap) both compiled by myself