Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

our servers need to update the libxml2 version from 2.2.26 to 2.9 (latest version). It is no problem that we have been installed the libxml2-2.9 version on our servers. but the problem is how can we config the libs path of libxml2 path in php? Since it still show the old version on phpinfo().

What we have do is 1. Install libxml2 2.7.X on CentOS 5.X

Using yum to install local files, and typed yum info libxml2, it shows 2.9 was installed.


share|improve this question
Did you restart apache? – Michael Hampton Dec 17 '12 at 4:21
yes, one of the server is using nginx, I have tried restart the apache, nginx, php-fpm or even reboot the server. It still shows old version in phpinfo(). – Cauliturtle Dec 17 '12 at 4:24
Where does the PATH environment variable point to for startup in your webserver? Remember your path may not be the same as system startup. – mdpc Dec 17 '12 at 5:02
@mdpc, I execute echo $PATH, it shows /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin:/root‌​/bin. And my libxml2 path is in /usr/lib64/ – Cauliturtle Dec 17 '12 at 5:09
up vote 0 down vote accepted

You will need to recompile PHP against the new libxml.

share|improve this answer
Yes... that was my findings yesterday. Thank you man! – Cauliturtle Dec 18 '12 at 2:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.