Resources for Upgrading to PHP 7 on IBM i

PHP 7 Zend ServerNow that speedy PHP 7 is available for IBM i, we’re helping our clients upgrade to this long-awaited release via Zend Server 9. I thought I’d share some of our favorite resources for performing this upgrade safely and efficiently.

First, we recommend Rod Flohr’s article Migrate to Zend Server 9 from Previous Versions, which contains both basic instructions and special tips.

The process is more a migration than an upgrade, because PHP 7  is installed in a different location than old releases. Applications can be tested with old and new PHP in parallel. Thus, even shops having only one IBM i partition can test PHP 7 thoroughly before going live.

The new locations are the ZENDPHP 7 library and /www/zendsvr7 IFS directory. The old locations were ZENDSVR6 and /www/zendsvr6.

Our clients sometimes ask if very much functionality has changed or been removed in PHP 7. We haven’t seen any core or critical functionality removed, but some older and less common functionality that was deprecated (marked for future removal) in previous releases has been removed in PHP 7.

To see what functionality has been removed or changed, see these resources:

One example of a backwards-incompatible change was the removal of deprecated bundled extension ext/mysql. It can still be added back, if needed, as an ordinary PECL extension, but we recommend using the superior ext/mysqli (“mysql improved”) or PDO, which support prepared statements (essential for security) and have been available since PHP 5.

Db2 users should be pleased that IBM has reworked the ibm_db2 extension for PHP 7 on IBM i so that functions such as db2_connect(), db2_prepare(), db2_execute(), and the rest, should work as well as they did in PHP 5. Applications should be tested, of course, but there are no known problems with ibm_db2 in PHP 7 at this time.

We expect a fairly smooth migration for most shops, but let us know if you’d like us to manage the migration for you (you may be capable, but busy) or to help make it even smoother.

 

1 reply
  1. Paul Foster
    Paul Foster says:

    Thanks Alan, I’ve installed zendphp7 and it is generally performing well.

    I’ve noticed one change …. php.log is now full of the following warning message:
    “PHP Warning: Module ‘ibm_db2’ already loaded in Unknown on line 0”

    This caused problems with return values as they are preceded by the warning message. Turning off display_errors in php.ini fixed this (probably should be off anyway) but the log is getting hammered even with error_reporting set to E_ERROR|E_CORE_ERROR|E_RECOVERABLE_ERROR.

    Any thoughts on how this can be prevented?

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *