|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
37 + 10 = ?
Subscribe to this entry?

 [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