Seiden Group Offers PHP Migration Service
May 27, 2020 Alex Woodie
Change is in the air when it comes to PHP on IBM i. The free Zend distribution of PHP that has been adopted by thousands of IBM i shops over the years is going away, and it’s being replaced by a new community distribution that’s installed via RPM. But how can you move existing PHP apps to the new environment? Seiden Group has a potential solution.
As we told you last week, the Zend Server Basic environment will stop being offered by Perforce (the company that now owns Zend Technology) or distributed with the IBM i operating system on June 30, 2020. One year later, it will stop supporting Zend Server Basic, although it will continue selling and supporting more advanced versions of the Zend Server PHP environment for IBM i.
For much of the IBM i installed base, it will be a no-brainer to develop new PHP applications using the Community PHP. But if IBM i shops want to run existing PHP applications on the new community edition, they typically will need to invest in some sort of application migration.
One vendor that can assist with the migration from Zend Basic to Community PHP is Seiden Group, a New Jersey-based consulting company that has been active in the IBM i PHP community for many years. According Alan Seiden, the company’s president, each migration poses unique challenges.
“Some are fine on their own, others need some advice,” Seiden says. “It depends on their applications. If they wrote modular code where the database connectivity and prepare functions and execute function and fetch functions are all in a couple of code libraries, or if they used frameworks like Zend Framework or Laravel, then it’s not difficult to do the conversion.”
Database connectivity is arguably the biggest source of potential problems in the migration, according to Seiden. With older versions of PHP distributed by Zend, database connections to Db2 for i were handled through the “IBM_DB2” extensions, which connected to the SQL call level interface (CLI) inside IBM i.
In modern PHP distributions, including Community PHP and new versions supported by Zend, those IBM_DB2 extensions are gone and have been replaced with an ODBC driver, which significantly outperforms the old database extension. “ODBC is the strategic direction of IBM,” Seiden says. “If you use the publicly available Community PHP, you need to convert your code to use ODBC, so we help customers do that.”
Another potential source for trouble is the move from a 32 bit environment to a 64 bit environment. The old Zend Basic distribution for IBM i executed in a 32 bit memory space, but the new Community PHP runs as a 64 bit application. The change is not a huge concern, but it’s something that can trip people up, particularly when it comes to extensions.
“32-bit to 64-bit does not impact PHP itself, except it lets you have simpler configurations,” Seiden says. “The modular extensions are written in C, and those have to updated to 64-bit, so it’s a matter of determining what extensions are being used in applications.”
Automated testing facilities, such as the ones that Seiden Group provides as part of a migration engagement, can help speed things along. That goes for companies migrating from Zend Basic to Community PHP, and it also goes for those who are staying within the Zend family but need to upgrade from discontinued PHP version 5.x to the new PHP 7.x release.
“IBM i shops do tend to run lean with a very small number of developers, and so often they’re busy adding features and not improving their infrastructure,” Seiden says. “Then when it’s time for an upgrade, they realize they could use some automated tests. They know they have to upgrade to PHP 7 for security reasons.”
PHP 7.x is a major upgrade from PHP 5.x in the performance department (and could require a migration in its own right). But it’s important to note that customers need to make the move to PHP 7.x to prevent potential security problems.
Zend deprecated portions of the old PHP codebase in the move to PHP 7 (PHP version 6, of course, was skipped). And just as the old custom-made Db2 for i driver for PHP has been replaced by a superior ODBC driver, the old custom MySQL driver for PHP has been replaced with a ODBC driver for MySQL’s replacement, MariaDB.
“If people are migrating to PHP 7, the older MySQL connection functions no longer work,” Seiden says. “The old MySQL_Connect no longer works in PHP 7. They have to use MySQLi_Connect. It lets them do prepared parameterized queries that protect against SQL injection. It’s more secure.”
Other parts of the migration to Community PHP are projected to go relatively straightforwardly. That includes the PHP Toolkit that a lot of IBM i shops use to call RPG, COBOL, and CL programs, which continues to work under Community PHP.
“There is really no change there,” Seiden says. “We just make sure it continues to work properly, especially if people are converting to ODBC. We need to make sure they get the newest version of the toolkit that works with ODBC very well.”
Finally, companies can also tap Seiden Group to remove their old PHP environment as part of the migration to the Community PHP. It’s an oft-overlooked aspect of migration, but a potentially important one (and it’s much neater not to have a bunch of unused software on your server, anyway).
Once the migration is over, Seiden Group can also provide technical support packages for IBM i shops, including break-fix support and help with upgrades.
“We also provide advice on new versions that come out, to keep our customers informed,” Seiden says. “We have monitoring tools that proactively check to make sure their installation is running smoothly and be able to backtrack if an issue occurs, to figure out what the cause was.”