Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/251.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
Php “运行”;gs";在Docker映像内部,使用exec不会为www数据用户返回任何输出_Php_Dockerfile_Ghostscript - Fatal编程技术网

Php “运行”;gs";在Docker映像内部,使用exec不会为www数据用户返回任何输出

Php “运行”;gs";在Docker映像内部,使用exec不会为www数据用户返回任何输出,php,dockerfile,ghostscript,Php,Dockerfile,Ghostscript,我已经在Docker文件中安装了Ghostscript,并验证了当我在Docker映像中时,它在终端中工作 Dockerfile: RUN apk add ghostscript 然而,当我试图运行print(exec(“gs-v”)来验证它是否安装用于PHP时,我没有收到任何输出 当我运行print(exec(“whoami”)时,我看到用户是www数据。我尝试查看权限,但似乎无法从PHP中运行Ghostscript 任何帮助都将不胜感激

我已经在Docker文件中安装了Ghostscript,并验证了当我在Docker映像中时,它在终端中工作

Dockerfile:

RUN apk add ghostscript
然而,当我试图运行
print(exec(“gs-v”)
来验证它是否安装用于PHP时,我没有收到任何输出

当我运行
print(exec(“whoami”)
时,我看到用户是www数据。我尝试查看权限,但似乎无法从PHP中运行Ghostscript

任何帮助都将不胜感激