|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46661 filesize() fails on files with name containing "┴" sign
Submitted: 2008-11-25 01:10 UTC Modified: 2009-05-25 01:00 UTC
Avg. Score:2.7 ± 1.2
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: hellsing at index dot hu Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5.2.6 OS: win32 only - Vista x64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hellsing at index dot hu
New email:
PHP Version: OS:


 [2008-11-25 01:10 UTC] hellsing at index dot hu
When I check file sizes in a loop with filesize($filename), everything is OK until it reaches files with the "┴" (like a T, but upside down) character in its name. Then this error message appears:

Warning: filesize() [function.filesize]: stat failed for /AppServ/www/kraftwerk/store47-115/+NTSZ_2008-01-27.DAT in D:\AppServ\www\dir2array.php on line 37

Please note that the filename contains "┴" but PHP is looking for "+".

I know this is crazy to use this kind of characters in filenames, but they are coming from an old system that can't use letters with accents. Some two thousand files are affected. I'm not able to replace nor to modify that app.

(char-to-code conversion is made by - I wrote the actual characters)

Reproduce code:
$fsize = filesize("/AppServ/www/kraftwerk/store47-115/" . $filename);

Expected result:
The size of the file in bytes.

Actual result:
Warning: filesize() [function.filesize]: stat failed for /AppServ/www/kraftwerk/store47-115/+NTSZ_2008-01-27.DAT in D:\AppServ\www\dir2array.php on line 37


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-17 20:55 UTC]
Please try using this CVS snapshot:
For Windows:

 [2009-05-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 00:01:23 2020 UTC