Innovate faster and cut risk with PHP experts from Zend Services.
See How Zend Helps Leading Hosting Providers Keep Their Managed Sites on Secure PHP
Learn PHP from PHP experts with free, on-demand, and instructor led courses.
Submit support requests and browse self-service resources.
The importance of understanding long-term support (LTS) for PHP and the implications and benefits of upgrading Zend Server (and therefore PHP) cannot be overstated!
It's important to understand that there are two ways of getting updates for PHP, one being the community and the other being Zend. Updates from either source provide defect and security patches. What's important to understand is that the end date for LTS differs based on the version of PHP and where updates are being obtained from. Consider the following LTS chart:
As you can see in the chart, community updates for a given version of PHP end before the updates from Zend do. As an example, if a shop is using version 5.6 of PHP they can no longer expect updates from the community (community updates ended at the end of 2018); however, updates from Zend continues to be available until the end of 2020. Likewise, updates for version 7 have different end dates depending on whether updates are being obtained from the community or Zend.
It's important to note that updates for versions of PHP prior to 5.6 are no longer provided by the community or Zend. So developing a plan for upgrading your version to at least version 5.6 should be top of mind!
Another item to be aware of is the versions of IBM i that the various versions of PHP are supported on. Specifically, versions prior to PHP 5.6 are not supported on version V7R1 or newer of IBM i. Likewise, version 5.6 is not supported on version V7R3 of IBM i. Version 7.x of PHP is supported on IBM i V7R1, V7R2, and V7R3.
What all this means is that if a shop is running a pre-5.6 version of PHP then an upgrade is in order. Additionally, if the operating system is being upgraded than an upgrade of PHP may also be necessary.
With the above information at hand let's talk about the impact of upgrading, tools to help with the upgrade, and taking advantage of IBM i subsystems for installation of Zend Server.
If you find that you need to upgrade from a pre-5.6 version of PHP, you should run the PHP line-of-code (phploc) utility against your code base to determine both the number of lines of code in your application as well as the complexity level of your application. This will help to determine the effort involved and if there is any backward compatibility (BC) breaks that will be encountered in the newer version of PHP.
The next thing to be aware of is those different versions if Zend Server (and therefore different versions of PHP) run in different subsystems, have different directory paths, and different TCP/IP ports. Consider the following table:
The TP/IP ports that the Zend Server installation establishes for the web applications, as well as the Web Management GUI, is based, in part, on whether a version of Zend Server has previously been installed. As an example, if version 2018.x of Zend Server (PHP version 7.x) is being installed on an IBM i that doesn't have a previous version of Zend Server than the port will be set to 10080 (Web Applications) and port 10081 (Web Admin GUI). If a previous version is installed – as an example Zend Server 8.5 (PHP 5.6) than the ports will likely be set to 10090 (Web Applications) and port 10091 (Web Admin GUI). The port numbers are reported at the end of the installation of Zend Server and can also be viewed in the Apache configuration file.
What this means is that for those upgrade scenarios where you're upgrading from one version to another that run in different subsystems, it's possible to have your current version installed alongside the newer version and perform a side-by-side migration.
Here's a sample of the steps to follow:
1. Install the new version of Zend Server. During the installation make note of the TCP/IP port numbers that are defined by the installation.
2. Copy the application scripts from current application directory (under the previous Zend Server docroot) to a new application directory under the updated Zend Server docroot.
3. Review the code for any calls to the command line interface for php (php-cli) and changes those to new Zend Server bin directory (example: for Zend Server 2018.x change any calls for php-cli to /usr/local/zendphp7/bin/php-cli
Another tool to be aware of is the PHP version 7 compatibility checker (php7cc). This utility can be used to scan the application files and report on any issues of the application that may need to be refactored prior to migrating the application to version 7 of PHP.
If you're looking for additional information on PHP and IBM i, be sure to visit our new collection of IBM i resources. With articles, white papers, and recorded webinars on all manner of IBM i content, you're sure to find something you like.
If you want more information on PHP versions and support feel free to contact us.
IBM Champion | Former - Senior Solutions Consultant, Zend, Perforce Software
As an IBM champion, Mr. Earley has been recognized as a leader in the IBM i community and offers more than 20 years of experience helping customers to implement solutions on the platform. His expertise includes using PHP, MariaDB, Docker, and Chef for creating modern enterprise solutions that run on IBM i, as well as PowerVC for cloud deployments and virtualization management. Mr. Earley is a frequent speaker at global technology conferences, and he has authored numerous articles on Linux, PHP, virtualization, systems management, and open source solutions and concepts.