Solved

Trying to update pcre on CentOS 5.10 with Cpanel

Posted on 2013-12-06
3
906 Views
Last Modified: 2013-12-09
I am trying to update the pcre install on CentOS 5.10 and am running into some issues I do not know how to address.

First things first, I am NOT a Linux guy so things that may seem obvious to you are unknown to me, keep that in mind.

I have successfully updated Apache from 2.0.x to 2.2.26. I have successfully updated PHP from 5.3.x to 5.4.22.

Running "pcretest -C" from the shell results in version 8.33. Running "php -i | grep -i pcre" shows PCRE Library Version 8.21. The 8.21 version is installed in /opt/pcre. The php config screen shows '--with-pcre-regex=/opt/pcre' so I see where it is getting the 8.21 version but I have absolutely no idea where the 8.33 version is or how to point the php configuration to it.

Any help appreciated.
0
Comment
Question by:AMPLECOMPUTERS
3 Comments
 
LVL 19

Accepted Solution

by:
xterm earned 500 total points
ID: 39702579
If you upgraded Apache/PHP via the cPanel web interface, then it's still going to be hardcoded to look in /opt/pcre

What I would suggest is to rename /opt/pcre to /opt/pcre.old, grab the source code of the pcre version that you want, and then compile it using that path, so:

<download pcre-xxx.tar.gz to temporary folder>
tar xzf pcre-xxx.tar.gz
cd pcre-xxx
./configure –prefix=/opt/pcre –enable-utf8 –enable-unicode-properties
make
make install

Then after you restart Apache, it should pick up the new version.  If you have any mishaps, you can just remove /opt/pcre and put the backup version back.
0
 
LVL 62

Expert Comment

by:gheist
ID: 39704916
Latest versions are
apache 2.2.3
php 5.1.6 threadsafe
php 5.3.3

What you do past that sooner or later breaks your system.  can only suggest that you keep using packages that are shipped by system vendor.

It is essential that you tell the steps you took, because e.g rpmbuilding apache from official tarball will break on pre-archaeologic versions of pcre, apr and openssl..

RHEL/Centos6 ships slightly refreshed packages.
0
 

Author Closing Comment

by:AMPLECOMPUTERS
ID: 39706052
That got me well on my way. Still had a few issues which I fixed by updating Apache and PHP to the latest versions and then compiling in suPHP and switching to CGI from PHP in the PHP config.

Thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
The viewer will learn how to dynamically set the form action using jQuery.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question