无法通过system()执行外部程序?

Lai*_*uan 5 php system external

我试图在php脚本中编译我的latex文件,但它无法调用xelatex.

在PHP脚本中:

system("/usr/bin/whoami");
system("/usr/bin/xelatex foo.tex 2>&1");
Run Code Online (Sandbox Code Playgroud)

输出:

myuser
sh: 1: /usr/bin/xelatex: not found
Run Code Online (Sandbox Code Playgroud)

但在我的终端:

$ /usr/bin/whoami
=> myuser
$ /usr/bin/xelatex foo.tex
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
...(successful output)...
Run Code Online (Sandbox Code Playgroud)

我运行php as myuser,并传递system()绝对路径.然后我就关掉safe_mode了.为什么我还不能执行外部程序?

Lai*_*uan 1

最后我联系了我的系统管理员并发现了问题。该机器位于 NFS 中,因此apache登录 shell 位于不同的机器上。xelatex运行apache的机器上没有。