ID: 34415 Updated by: [EMAIL PROTECTED] Reported By: worthbob01 at yahoo dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: rh es 3 PHP Version: 5.1.0RC1 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-09-10 17:22:17] worthbob01 at yahoo dot com still happening with php5-200509101430 [EMAIL PROTECTED] design]# d date; php --version; php sample.php ; date Sat Sep 10 10:14:14 CDT 2005 PHP 5.1.0-dev (cli) (built: Sep 10 2005 10:11:54) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies Segmentation fault Sat Sep 10 10:14:15 CDT 2005 [EMAIL PROTECTED] design]# ------------------------------------------------------------------------ [2005-09-10 17:04:50] worthbob01 at yahoo dot com [EMAIL PROTECTED] design]# date; php --version; php sample.php ; date Sat Sep 10 10:02:20 CDT 2005 PHP 5.1.0-dev (cli) (built: Sep 9 2005 12:59:00) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies Segmentation fault Sat Sep 10 10:02:21 CDT 2005 ------------------------------------------------------------------------ [2005-09-07 23:43:42] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-09-07 23:13:41] worthbob01 at yahoo dot com Description: ------------ recursive scandir causes seg fault. code example from http://us2.php.net/scandir User Contributed Notes. Reproduce code: --------------- <?php $afiles = scandir_recursive("/tmp"); function scandir_recursive($directory) { $folderContents = array(); $directory = realpath($directory).DIRECTORY_SEPARATOR; foreach (scandir($directory) as $folderItem) { if ($folderItem != "." AND $folderItem != "..") { if (is_dir($directory.$folderItem.DIRECTORY_SEPARATOR)) { $folderContents[$folderItem] = scandir_recursive( $directory.$folderItem."\\"); } else { $folderContents[] = $folderItem; } } } return $folderContents; } ?> Expected result: ---------------- nothing as there is not output in the sample. just expected it to run without a seg fault. Actual result: -------------- [EMAIL PROTECTED] design]# date;php sample.php;date Wed Sep 7 16:11:11 CDT 2005 Segmentation fault Wed Sep 7 16:11:12 CDT 2005 [EMAIL PROTECTED] design]# ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34415&edit=1
