Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
内部服务器错误500 mkdir():权限被拒绝apache php_Php_Apache_Centos_Mkdir_Permission Denied - Fatal编程技术网

内部服务器错误500 mkdir():权限被拒绝apache php

内部服务器错误500 mkdir():权限被拒绝apache php,php,apache,centos,mkdir,permission-denied,Php,Apache,Centos,Mkdir,Permission Denied,Apache给出了Centos linux远程服务器上php的权限错误 我读书,尝试了一切,但没有运气 我尝试使用setenforce 0禁用SELinux 我尝试了所有777和chown-R apache:apachevar/www chown-R root:apachevar/ww 此外: chcon-R-t httpd\u sys\u content\u t/var/www chcon-R-t httpd\u sys\u content\u rw\u t/var/www/http/f3 错

Apache给出了Centos linux远程服务器上php的权限错误

我读书,尝试了一切,但没有运气

我尝试使用setenforce 0禁用SELinux

我尝试了所有777和chown-R apache:apachevar/www chown-R root:apachevar/ww

此外: chcon-R-t httpd\u sys\u content\u t/var/www chcon-R-t httpd\u sys\u content\u rw\u t/var/www/http/f3

错误日志显示:

/var/www/html/f3/lib/ErrorHandler.php on line 26
[Wed Jul 08 14:06:51.744772 2015] [:error] [pid 29288] [client 127.0.0.1:37240] mkdir(): Permission denied
[Wed Jul 08 14:06:51.745084 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/lib/base.php:2015] Base->error(500,'mkdir(): Permission denied')
[Wed Jul 08 14:06:51.745124 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/lib/base.php:2407] mkdir('/f3/tmp/f3filescache/',493,true)
[Wed Jul 08 14:06:51.745134 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/lib/base.php:340] Cache->load('folder=/f3/tmp/f3filescache/',true)
[Wed Jul 08 14:06:51.745141 2015] [:error] [pid 29288] [client 127.0.0.1:37240] [f3/index.php:6] Base->set('CACHE','folder=/f3/tmp/f3filescache/')
[Wed Jul 08 14:06:51.746083 2015] [:error] [pid 29288] [client 127.0.0.1:37240] PHP Warning:  file(f3/lib/base.php): failed to open stream: No such file or directory in /var/www/html/f3/lib/ErrorHandler.php on line 26
我感到绝望和愤怒。 有人知道可能出了什么问题吗


谢谢。

你说的“在Centos linux远程服务器上使用php”到底是什么意思?php(尝试创建目录)是否在您要创建目录的文件系统之外的其他地方运行?还是我误解了?我读了
mkdir('/f3/tmp/f3filecache/',493,true)
。在目录名的开头有斜杠(/)吗?这将是一条绝对的道路。。。wihch当然是不可写的,如果您使用的是PHP7.0.5或更低版本,那么请安装PHP7.0.10。在类似的情况下,它帮助了我。