Updating to PCRE 8.33 or Higher

The extension requires PCRE 8.33 or higher.

The process below describes how to update to PCRE 8.33 on an Ubuntu virtual server (instance) running on an Amazon AWS.

As of this date, the Ubuntu server will install PCRE 8.31. To update to 8.33 you will need to install a number of library packages necessary to compile new code. You will also need to know how to login as the root user.

If you don't want to compile things, Ondřej Surý's PHP PPA may also work.

Using PPA ondrej/php

 * https://launchpad.net/~ondrej/+archive/ubuntu/php

Ondřej Surý happens to be the Debian maintainer for PHP, so this is a reasonably high-quality PPA.

As of January 2018, it carries PCRE 8.41. This worked to upgrade PCRE on Ubuntu 14.04.

Caution: This PPA installs a lot of other stuff if you let it. Keep an eye on what it installs, be prepared to revert if something goes wrong. But it'll probably be just fine.

Log In to Your Server
You will, of course, need to follow the Amazon AWS instructions for connecting with the server. One option is to download and install Git Bash and log-in to the server using your key.

If your Key.pem is in KeyDirectory those commands may look something like:

If you successfully login, the prompt will show your path followed by $

Install Packages Needed to Compile PCRE 8.33
Do not try to go to the root directory to run the following commands. Run them from the default directory where your permissions are already set up right.

Cut and paste the following lines. They will all run in sequence. If there are any errors, you may need to run each install separately, as is done with the first three:

Download PCRE 8.33 or Higher
You can search for the latest package address, which may be higher than 8.33. The steps below include the address for the package as of this date, Make any required changes for a different version or package

If the package extracts properly, you will see all the new contents in the directory pcre-8.33. To see directories, type in the command line: ls

Now Compile and Check the Code for PCRE 8.33
Now test the make, with the command:

Now finish up the libraries with this command:

Sudo priviliges are required for the final make.

Then restart the server:

Test it
The above command should indicate how things are going.

Run the phpinfo.php page on your server (lookup how to make one, if you don't) and check what is listed for PCRE.

In my case, it still shows 8.31 installed, event though pcretest shows 8.33. Go figure! I don't know what to make of it at this time...nor can I tell if it is still causing problems with Scribunto.

But I hope this helps!

Login as Root User
According to this source, I made a mistake compiling as root user, since that messes up privileges. But I'm leaving this section to explain how to Login as Root User, just in case it helps someone.


 * Enter the command:.
 * This will prompt you to create a password for your root account. Make sure you don't forget it.
 * Enter the command . You will be asked for your root password.
 * Your prompt will change from $ to #, indicating you have root access.
 * Enter the command   to move to the root directory
 * Enter the command   this should show you the directories and files in the root directory, including the new directory pcre-8.33

NOTE: To disable root access, enter the command  sudo passwd -dl root

Reference Pages
http://www.linuxfromscratch.org/blfs/view/7.4/general/pcre.html http://stackoverflow.com/questions/12212079/pcre-libraries-version-is-too-old