我有一个非常奇怪的错误。PHP 无法读取确实存在的文件...一些想法?我还没有安装 SELinux。我正在使用 Fedora 17 和 php 5.4。
我已经尝试了我所知道的一切,但问题仍然存在。
[root@sqd var]# ls -lia
total 92
8194 drwxrwxrwx. 23 root root 4096 ago 17 10:30 .
2 dr-xr-xr-x. 19 root root 4096 ago 13 16:00 ..
32139 drwxr-xr-x. 2 root root 4096 may 22 13:42 account
288 drwxr-xr-x. 2 root root 4096 feb 3 2012 adm
13 drwxr-xr-x. 14 root root 4096 ago 8 10:26 cache
796005 drwxr-xr-x 2 root root 4096 feb 6 2012 cvs
289 drwxr-xr-x. 3 root root 4096 ago 21 18:07 db
290 drwxr-xr-x. 3 root root 4096 may 22 13:42 empty
263682 drwxr-xr-x. 3 root root 4096 ago 7 11:15 ftp
291 drwxr-xr-x. 2 root root 4096 feb 3 2012 games
35931 drwxrwx--T. 2 root gdm 4096 jun 8 16:05 gdm
292 drwxr-xr-x. 2 root root 4096 feb 3 2012 gopher
15 drwxr-xr-x. 45 root root 4096 ago 10 10:42 lib
296 drwxr-xr-x. 2 root root 4096 feb 3 2012 local
308 lrwxrwxrwx. 1 root root 11 may 22 13:39 lock -> ../run/lock
12 drwxr-xr-x. 14 root root 4096 ago 26 03:17 log
297 lrwxrwxrwx. 1 root root 10 may 22 13:39 mail -> spool/mail
298 drwxr-xr-x. 2 root root 4096 feb 3 2012 nis
931987 drwxrwxrwx 3 nobody nobody 4096 ago 17 10:32 nodejs
299 drwxr-xr-x. 2 root root 4096 feb 3 2012 opt
300 drwxr-xr-x. 2 root root 4096 feb 3 2012 preserve
307 lrwxrwxrwx. 1 root root 6 may 22 13:39 run -> ../run
301 drwxr-xr-x. 15 root root 4096 may 22 13:43 spool
305 drwxrwxrwx. 5 nobody nobody 4096 ago 30 14:13 tmp
262637 drwxr-xr-x. 7 root root 4096 ago 7 11:20 www
306 drwxr-xr-x. 2 root root 4096 feb 3 2012 yp
[root@sqd var]# ls -lia tmp/
total 216
305 drwxrwxrwx. 5 nobody nobody 4096 ago 30 14:13 .
8194 drwxrwxrwx. 23 root root 4096 ago 17 10:30 ..
3030 -rwxrwxrwx 1 nobody nobody 199397 ago 30 14:13 file_thumb_5363_1_0.jpg
但
<?php
highlight_file(__FILE__);
var_dump(file_exists('/var/tmp/file_thumb_5363_1_0.jpg'));
打印:
bool(false)