ID: 37987 Updated by: [EMAIL PROTECTED] Reported By: tokul at users dot sourceforge dot net -Status: Open +Status: Closed Bug Type: Filesystem function related PHP Version: 5.1.4 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2006-07-02 13:31:25] tokul at users dot sourceforge dot net Description: ------------ PHP documentation (http://www.php.net/file-exists) states that file_exists() function returns false, when file is inaccessible due to safe mode restrictions. Tested PHP 4.3.10, 4.4CVS (200607021030), 5.1.4 and 5.2CVS(200607021030). In PHP 5.1.4 and 5.2CVS file_exists() function returns true, when file exists, but is inaccessible due to safe mode restrictions. Other php versions work as documented. Reproduce code: --------------- <?php var_dump(ini_get('safe_mode')); var_dump(file_exists('/usr/games/fortune')); var_dump(is_file('/usr/games/fortune')); var_dump(is_dir('/usr/games/fortune')); ?> Expected result: ---------------- When safe_mode is on ---- string(1) "1" bool(false) bool(false) bool(false) ---- When safe_mode is off ---- string(0) "" bool(true) bool(true) bool(false) ---- Actual result: -------------- When safe_mode is on ---- string(1) "1" bool(true) bool(false) bool(false) ---- When safe_mode is off ---- string(0) "" bool(true) bool(true) bool(false) ---- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37987&edit=1
