0

我们在工作中使用非托管 Rackspace 云服务器。它运行的是 Ubuntu 11.10。我想安装 gearman 库和扩展,所以我需要找到当前加载的php.ini文件。运行phpinfo(),它说文件在/etc/php.ini. 但是,当我在终端中转到此目录时,没有文件。

这里发生了什么,我该如何开始解决这个问题?

更新:我也刚刚php --version在终端中运行,它返回 phpinfo() 显示的错误版本

4

1 回答 1

1

It sounds like the webserver is running the site in a chroot environment, so that what is reported as /etc/ by the webserver isn't the same /etc/ that is used the machine as a whole.

As for the php --version reporting a different version, that likely means you have two separate versions of PHP installed. The web server is configured to use one (possibly again installed inside the chroot environment), and the machine as a whole is running an entirely different copy outside of the web server.

Read more about chroot here: http://en.wikipedia.org/wiki/Chroot

于 2013-01-24T14:46:49.217 回答