Domanda

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()

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top