Vps – Upgrade PCRE on CentOS 5.5

centos5vpsyum

I'm trying to upgrade pcre on my CentOS 5.5 VPS.

Unfortunately the only RPMs available are for 6.6 in yum. I've found some links to newer versions of PCRE and even tried (and succeeded) at compiling pcre, but I can't get php to recognize the newer version that I've installed.

Do I need to recompile php? It seems that if I have to recompile PHP I have to recompile Apache. Is there any way I can avoid this?

Thank you!

Best Answer

Chances are that you need to update your DSO loader configuration to add the path to your new libraries. This can be done on a per-process basis by setting LD_LIBRARY_PATH before launching the application, or you can update it globally by creating a file in /etc/ld.so.conf.d that contains the paths to the directories holding your .so files, one per line. Afterwards, run ldconfig to update the cache.

You can check which copy is currently being loaded by running ldd /usr/bin/php | grep -w libpcre.so.0. If it's any copy other than the one you want to load, you need to update your library search path.

Related Topic