문제

We use an unmanaged Rackspace cloud server here at work. It's running Ubuntu 11.10. I wanted to install the gearman library and extension so I need to find the currently loaded php.ini file. Running phpinfo(), it says the file is at /etc/php.ini. Yet when I go to this directory in terminal, there is no file.

What's going on here and how can I start to sort this out?

UPDATE: I also just now ran php --version in terminal and it returns the wrong version displayed by phpinfo()

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top