PHP 4.0 Bug #6281 Updated: readdir returns valid filenames only if they are <= 13 characters in length.

From: Date: Thu, 21 Sep 2000 14:45:16 +0000
Subject: PHP 4.0 Bug #6281 Updated: readdir returns valid filenames only if they are <= 13 characters in length.
Groups: php.dev 
Request: Send a blank email to php-dev+get-33481@lists.php.net to get a copy of this message
ID: 6281 Updated by: sniper Reported By: stephen.anthony@nrc.ca Status: Closed Bug Type: *General Issues Assigned To: Comments: No feedback. Previous Comments: --------------------------------------------------------------------------- [2000-08-23 08:49:07] sniper@php.net Does this problem exist with more recent versions of php4 (from CVS or http://snaps.php.net ) ?? --Jani --------------------------------------------------------------------------- [2000-08-21 14:44:57] stephen.anthony@nrc.ca Greater than 13 character filenames tend to return as garbage after the first 13/14 characters. Compiled PHP with gcc 2.8.1 (built under IRIX 6.5.3m (?)). An example of a returned file name with readdir is: general399f1d3^Z01c Where the filename is: general399f1d36ea41c Example code: $handle = opendir($config["base"] ."/contrib"); while ($file = readdir($handle)) { $f++; } closedir($handle); if ($f > 2) { // if there are files to be processed $handle=opendir($config["base"] ."/contrib"); while (($file = readdir($handle))!==false) { if ($file != "." && $file != "..") { print $file; } --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6281

« previous php.dev (#33481) next »