php.net |  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
Votes:3
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-11-25 01:10 UTC] hellsing at index dot hu
Description:
------------
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 php.net/report.php - 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-17 20:55 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 04:01:31 2024 UTC