Zend Server for IBM i version 9 is a new Licensed Program. To upgrade from versions 8 and earlier will require a migration. This article provides some notes to help you get started with this task.
Zend Server for IBM i version 9 or higher installed parallel to Zend Server 8 or lower on any supported version of IBM i.
Zend Server for IBM i supports parallel installations of Zend Server 9.x with earlier versions of Zend Server on the same machine or partition. They are different Licensed Programs on the IBM i, which allows for testing of the new version when there is only one IBM i partition available. It also provides a convenient method for upgrading to PHP 7.
Download and Install Zend Server 9
To begin, please download and install Zend Server 9, using the full installation (i.e. not an installer labelled "upgrade"). Here are some tips for downloading and installing Zend Server:
After installing Zend Server 9, you should see two versions of Zend Server installed. From a command line:
Take option "10. Display installed licensed programs". Page down to find the installed Zend Server Licensed Programs. You should see entries similar to these:
6ZSVRPI *INSTALLED Zend Server for IBM i 8.5.7 ( PHP 5.6 )
7PHPZND *INSTALLED Zend Server for IBM i 9.1 ( PHP 7.1 )
Copy Applications and Other Content to Zend Server 9
The simplest installations typically have PHP scripts and other content in the /htdocs directory for the Apache instance. This content can simply be copied to the new /htdocs folder.
- Copy your content from '/www/zendsvr6/htdocs' to '/www/zendphp7/htdocs'.
- Verify the scripts in '/www/zendphp7/htdocs' and any subfolders have *RX permissions granted to user QTMHHTTP.
You should now be able to execute your /htdocs scripts in Zend Server 9 by changing the port. For example, if you had a script '/www/zendsvr/htdocs/hello.php', using Zend Server 8 you could run it in your browser at this address:
http://<your i5 ip address>:10080/hello.php
You could copy the script into '/www/zendphp7/htdocs/hello.php', grant user QTMHHTTP *RX permissions to it, then run it at this address:
http://<your i5 ip address>:10090/hello.php
If you have any deployed Virtual Hosts, Libraries, and/or Applications in Zend Server 8, simply deploy them in Zend Server 9 using the User Interface. Libraries already present in Zend Server 9 from the installation (Framework and Toolkit libraries) do not have to be redeployed.
If you have manually created Virtual Hosts in the Apache configuration for the ZENDSVR6 instance of Apache, you will need to also create them in the ZENDPHP7 instance.
Change the Path for PHP-CLI Calls
If you have calls to php-cli in CL programs, you will need to change the path to use the new version:
Where for Zend Server 8 you would use this:
For Zend Server 9, use:
Change the Path for Full Path References
Some customers prefer to use full paths in include() and require() functions. This can provide a performance boost as the IFS can be a little slow finding a relative path. Scan your scripts for '/zendsvr6' and replace with '/zendphp7'. Be careful about automating this step, to avoid unintended consequences. And of course, test everything.
Java Bridge is Like the Highlander, There Can Only Be One
The Java Bridge daemon uses the same port for all versions of Zend Server, and performs the same functions, so there can only be one version of the Java Bridge Daemon running at any given time. Since it is accessed by the port, scripts running in any version can use it.
Multiple Apache Instances
Zend Server does not support any Apache instances other than the default (ZENDPHP7 for ZS 9 and ZENDSVR6 for ZS 8). We do have customers who have implemented additional Apache instances by adding a FastCGI configuration to these other instances. If you have any such instances, you can redirect them to PHP 7 by changing any occurrences of '/zendsvr6' to '/zendphp7' in the fastcgi.conf for that instance. However, you might need to do other things, and it is easy to mess this file up, so please be careful. This activity is not covered under your Zend Support subscription, so please be sure you know what you are doing, or have whoever set this up for you in the first place come back and make the needed changes.
Customers using Virtual Hosts or multiple Apache instances may find that migration presents an opportunity to use Deployment instead to configure and manage their Virtual Hosts and Applications. Many of these multiple Apache instances configurations were done at a time when Zend Server did not have Deployment functions built in.
Access the User Interface at Port 10091
For Zend Server 8, the User Interface is found in your browser at port 10081:
http://<your IBMi ip address>:10081
For Zend Server 9, the User Interface is found in your browser at port 10091:
http://<your IBMi ip address>:10091
Review Changes for PHP 7
Each point release of PHP has migration notes related to the previous version. So for example, migration notes for PHP 7.0 show changes that would need to be made to PHP 5.6 code. So, if you are moving from PHP 5.5 to 7.1, you would need to review the migration notes for PHP 5.6, 7.0, and 7.1. So, how far you are coming determines how far back you need to go. Here are the links:
If you are coming from 5.2 or 5.3, you will likely notice a pattern in the links that will help you find the pages you need.
Before you go into production with Zend Server 9, test everything. Test until you are sure everything works. Test until you know everything works. Test until you know that you know that everything works. If you have never built any kind of test plan to exercise your entire site, now would be an excellent time to do that. This article is just a guide to the most common considerations for the migration. We can't think of everything. The only way to be sure you have taken care of everything is to verify that you have taken care of everything. Test it all.