Solved

Trying to update pcre on CentOS 5.10 with Cpanel

Posted on 2013-12-06
3
924 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

728 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