Home >Backend Development >PHP Tutorial >php error_log 提示文件不存在

php error_log 提示文件不存在

WBOY
WBOYOriginal
2016-06-06 20:27:101205browse

[01-Oct-2015 13:41:29 PRC] PHP Warning: error_log(/tmp/logs/weixin/asss.txt): failed to open stream: No such file or directory in /usr/share/nginx/html/test2.php on line 3

如上面的 php-fpm 错误日志记录 , 明明有这个文件和 目录呀 , 为何它还提示 No such file or directory , (/usr/share/nginx/html/ 这个目录能写进去)

回复内容:

[01-Oct-2015 13:41:29 PRC] PHP Warning: error_log(/tmp/logs/weixin/asss.txt): failed to open stream: No such file or directory in /usr/share/nginx/html/test2.php on line 3

如上面的 php-fpm 错误日志记录 , 明明有这个文件和 目录呀 , 为何它还提示 No such file or directory , (/usr/share/nginx/html/ 这个目录能写进去)

谁给差评的 , 我艹 , 天天有人给差评 .. 我要投诉 !!

你以为是 改个 777 就能解决的白痴问题么 .

今天我才发现是 systemd服务管理 里的 PrivateTmp 问题.
日狗了 .

提示的是这个路径不存在:

<code>/tmp/logs/weixin/asss.txt</code>

看下文件的权限,如果文件确实存在的,可能是没有读写权限。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn