Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
This worked perfectly! Thank you so much! –  Mark G. Dec 11 '10 at 6:40
    
I actually missed an important step, so I'm glad it worked. :) –  jgoldschrafe Dec 11 '10 at 15:55

Your Answer

 
discard

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.