ID: 34983
User updated by: trustpunk at hotmail dot com
Reported By: trustpunk at hotmail dot com
Status: Open
Bug Type: Directory function related
Operating System: Windows XP
PHP Version: 5.0.5
New Comment:
I found the real problem!
Lets say I choose a download directory "dir"
When I put a 255 char(s) file/dir inside the "dir" folder
, I want to be able to see it listed from PHP , is there
a way you guy's can fix this problem im having ?
Note: Apache has no problems with letting me download a
file so it can't be the 255 char(s) limit in Windows. :-)
Also , im only using Apache to test this. I use (Abyss)!
Previous Comments:
------------------------------------------------------------------------
[2005-10-26 21:38:47] trustpunk at hotmail dot com
Directory Tree
01234567891011121314
- oh no
- example
- Silverstein
- music
- 10 - Three Hours Back
- 02 - Smile In Your Sleep
- 01 - Your Sword Versus My Dagger
- 05 - Discovering The Waterfront
- 08 - Always And Never
- I like
inside the last folder , put the file named
"testing_for_bug - oops_a_404_error.txt and
rename that last folder to "I like you the
way you are" , hope this helps.
The path to a file is limited to 315 char(s)
if your including the begining / and end /
Now I know its not very possible for Windows to have so many
folders but I proved that it can be done and that you should
fix this , I believe this could lead to problems.
------------------------------------------------------------------------
[2005-10-26 21:30:51] [EMAIL PROTECTED]
So, what should one do to reproduce it?
What should be the directory structure etc. ?
------------------------------------------------------------------------
[2005-10-26 20:04:36] trustpunk at hotmail dot com
Im sorry to say but PHP - v5.0.6 Dev did not fix it. Here's
the path I was using , you can see if from the PHP error.
Warning: filesize() [function.filesize]: stat failed for
6c7695d7af/ohn/example/Silverstein/music/10 - Three Hours Back/02 -
Smile In Your Sleep/01 - Your Sword Versus My Dagger/05 - Discovering
The Waterfront/08 - Always And Never/I like you the way you are/01 -
Your Sword Versus My Dagger.mp3 in C:\Website\directory_listing.php on
line 82
------------------------------------------------------------------------
[2005-10-26 03:55:19] [EMAIL PROTECTED]
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed already according to user.
------------------------------------------------------------------------
[2005-10-26 00:38:22] trustpunk at hotmail dot com
The opendir had a small bug in it. Its Fixed!
<pre>
<?php
$dir = "dir... here";
$open = opendir($dir);
while($file = readdir($open)) {
$file_name = "$dir/" . $file;
if (is_file($file_name)) {
echo $file . " Size: " .
filesize($file_name) . "<br>";
}
}
closedir($open);
?>
</pre>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34983
--
Edit this bug report at http://bugs.php.net/?id=34983&edit=1