Have OPDK 4.16.01 and scan indicates PHP vulnerabilities. How to upgrade PHP?

Not applicable

Currently installed 4.16.01 which includes Dev Portal with PHP 5.4. Secuity scan indicates PHP 5.4 has vulnerabilities and we must upgrade to 5.5.

We did a yum install php55 php55-php php55-php-gd php55-php-mbstring

and a few other related packages and now have security vulnerabilities being reported in both PHP54 and PHP55.

How do we get rid of old versions of PHP? I am worried that just issuing an yum erase will break the Dev Portal.

0 6 214
6 REPLIES 6

Not applicable

Please immediately raise this as a support ticket.

Not applicable

I am preparing a document on this very topic.

Here's the outline of how it's done with CentOS or RHEL. These are only vague pointers; I will flesh things out in the next week or two.

  1. Add the ius repo to your list of available repos. This page has more info: https://ius.io/GettingStarted/
  2. Uninstall all vanilla PHP-related rpms. You can get a list of these as follows: rpm -qa | grep php
  3. For each of the above you uninstalled, install the corresponding one starting with php56u (for PHP 5.6) or php70u (for PHP 7.0).
  4. Restart Apache.

I strongly suggest trying this out in a VM first to make sure you have all the wrinkles ironed out.

Not applicable

Not applicable

Thanks for documenting the process! Helps alleviate much trial and error. Will attempt it on Monday.

You're welcome! At some future time this will be written as a script and bundled with on-premises upgrade packages.

The upgrade worked as documented. Thanks