|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-22 14:14 UTC] tony2001@php.net
[2005-05-22 15:10 UTC] palacsint at freemail dot hu
[2005-05-22 15:20 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 08:00:01 2025 UTC |
Description: ------------ If the upload_tmp_dir is a symlink, file_exists() doesn't work after a realpath() call. In my server the default /tmp is a symlink to /home/tmp. It works if i change the upload_tmp_dir to the /home/tmp. (safe_mode on) Reproduce code: --------------- $t = $_FILES["uf"]["tmp_name"]; // $t = /tmp/phpAbcde // realpath($t) = /home/tmp/phpAbcde var_dump(file_exists($t)); // true var_dump(file_exists(realpath($t))); // false var_dump(is_file($t)); // true var_dump(is_file(realpath($t))); // false Expected result: ---------------- I got false when i called the file_exists() and is_file() with realpath($t).