file_exists works incorrectly with long filenames
| Bug #38276 | file_exists works incorrectly with long filenames | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2006-07-31 21:32 UTC | Modified: | 2006-08-05 17:15 UTC |
|
||||||||||
| From: | bjoernhaeuser at googlemail dot com | Assigned: | ||||||||||||
| Status: | Closed | Package: | Filesystem function related | |||||||||||
| PHP Version: | 5.2. (latest) | OS: | Windows | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2006-07-31 21:32 UTC] bjoernhaeuser at googlemail dot com
Description: ------------ Hey Guys! Relating to: http://bugs.php.net/bug.php?id=31347 This Bug seems to be not fixed. Reproduce code: --------------- D:\>php -r "var_dump(file_exists(str_repeat('a', 10000)));" D:\>php -r "var_dump(file_exists(str_repeat('a', 255)));" Expected result: ---------------- file_exists should return false in both cases. Actual result: -------------- D:\>php -r "var_dump(file_exists(str_repeat('a', 10000)));" bool(true) D:\>php -r "var_dump(file_exists(str_repeat('a', 255)));" bool(false)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-08-03 13:56 UTC] bjoernhaeuser at googlemail dot com
Sorry for my late answer. I am getting this with the latest snapshot: D:\php5.2-win32-latest>php -v PHP 5.2.0RC2-dev (cli) (built: Aug 3 2006 12:21:14) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies D:\php5.2-win32-latest>php -r "var_dump(file_exists(str_repeat('a', 10000)));" bool(true) D:\php5.2-win32-latest>php -r "var_dump(file_exists(str_repeat('a', 255)));" bool(true) file_exists works here totally incorrect. Yours sincerely[2006-08-03 14:06 UTC] bjoernhaeuser at googlemail dot com
I have just checked some more and found this: D:\php5.2-win32-latest>php -r "var_dump(file_exists(str_repeat('a', 236)));" bool(false) D:\php5.2-win32-latest>php -r "var_dump(file_exists(str_repeat('a', 237)));" bool(true) file_exists works here incorrectly with filenames > 236 Yours sincerely[2006-08-03 14:18 UTC] tony2001@php.net
[2006-08-04 13:49 UTC] bjoernhaeuser at googlemail dot com
Well I am getting this: D:\php5.2-cvs>php -v PHP 5.2.0RC2-dev (cli) (built: Aug 4 2006 12:21:08) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies D:\php5.2-cvs>php -r "var_dump(file_exists(str_repeat('a', 246)));" bool(true) D:\php5.2-cvs>php -r "var_dump(file_exists(str_repeat('a', 245)));" bool(false) So, its not fixed.[2006-08-04 17:20 UTC] bjoernhaeuser at googlemail dot com
D:\php4.3\cli>php -r "var_dump(file_exists(str_repeat('a', 260)));" Warning: file_exists(): Stat failed for aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (errno=0 - No error ) in Command line code on line 1 bool(false) D:\php4.3\cli>php -r "var_dump(file_exists(str_repeat('a', 255)));" bool(false) Works 'correctly' for me.[2006-08-05 13:19 UTC] tony2001@php.net
[2006-08-05 17:15 UTC] bjoernhaeuser at googlemail dot com