[PHP-DEV] Latest CVS crashes on Win32 with Directory Functions
This script ?php $test = scan_directory('g:/', $files); function scan_directory($directory, $files) { $handle = opendir($directory); while (false !== ($file = readdir($handle))) { if ($file != '.' $file != '..') { if (!@is_dir($directory . $file)) { if (substr($file, -3) == 'mp3') { $files[] = $directory . '//' . $file; } } else { scan_directory($directory . $file, $files); } } } closedir($handle); } ? gives error messages like Warning: OpenDir: Invalid argument (errno 22) in e:\server\htdocs\test.php on line 5 Warning: Supplied argument is not a valid Directory resource in e:\server\htdocs\test.php on line 7 and then crashes with an 'unknown software exception'. Configuration: PHP 4 built from latest CVS as CGI on Win32. The scan_directory() function worked fine, back when I wrote it - which was some weeks ago. -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Latest CVS crashes on Win32 with Directory Functions
Sebastian Bergmann wrote: $test = scan_directory('g:/', $files); The '$test = ' is obsolete, btw. and then crashes with an 'unknown software exception'. I'm confused. It seems to work fine and does not crash when the given directory is on a readable/writeable drive, I tested only with a CD-Rom drive earlier. -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Latest CVS crashes on Win32
Latest CVS crashes - built as CGI - on Win32. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Latest CVS crashes on Win32
Sebastian Bergmann wrote: Latest CVS crashes - built as CGI - on Win32. Fixed now, thanks. -- sebastian bergmann[EMAIL PROTECTED] http://www.sebastian-bergmann.de bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]