Solved

Trying to update pcre on CentOS 5.10 with Cpanel

Posted on 2013-12-06
3
899 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 61

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn how to dynamically set the form action using jQuery.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now