PHP 8.6 is Coming Soon to IBM i

Scheduled for late 2026, PHP 8.6 is expected to bring numerous improvements, especially in diagnostics, security, and performance.

Here are several PHP 8.6 highlights that I see as helpful for IBM i users and a note about PHP 8.2 going end-of-life.

Seiden Group’s Contribution to PHP 8.6

We are especially pleased that one of the proposed PHP 8.6 enhancements comes from our own team. Calvin Buckley of Seiden Group wrote the RFC to display function arguments in PHP error messages:

https://wiki.php.net/rfc/display_error_function_args

This improvement is designed to make debugging easier by showing more information when a built-in function fails.

For example, instead of seeing only that a file operation failed, developers may be able to see which argument caused the problem. That kind of detail can save time when troubleshooting production issues.

Easier JSON Troubleshooting

PHP 8.6 should help when looking for invalid JSON. Before PHP 8.6, json_last_error_msg() would describe the error, but not tell where in the JSON string to find the invalid portion.  Now, in 8.6, if json_decode() fails, error and exception messages can indicate where the JSON problem occurred. Courtesy of the php.watch site, here is an example:

For applications that exchange data with APIs, web services, JavaScript front ends, and vendor systems, this should make testing and support easier.

Safer Defaults and Security Hardening

PHP 8.6 also includes security improvements. More secure session defaults are planned, including strict session mode, HttpOnly session cookies, and SameSite=Lax cookies:

https://wiki.php.net/rfc/session_security_defaults

These settings help reduce common risks such as session fixation, stolen cookies through JavaScript, and some cross-site request forgery scenarios.

Other security-related changes include tighter handling of invalid inputs, safer SQL string quoting for mysqli, and limits on long php://filter chains that have been abused in certain attack techniques:

https://wiki.php.net/rfc/policy-exempt-type-value-error-bc-policy

https://wiki.php.net/rfc/mysqli_quote_string

https://wiki.php.net/rfc/limit-maximum-number-of-filter-chains

JSON Performance Improvements

There are performance improvements as well, including faster JSON encoding of arrays and objects, and better performance when using json_encode() with PHP_JSON_PRETTY_PRINT.

True Async: A Direction to Watch

Another area to watch is True Async, which prepares PHP to compete with other languages that natively support concurrent tasks, services, and I/O operations. For IBM i teams, that direction is worth watching as PHP continues to be used for more than traditional web pages.

PHP 8.2 End of Life Is Approaching

While PHP 8.6 develops, PHP 8.2 is approaching end of life. Its security support ends on December 31, 2026. After that, PHP 8.2 will no longer receive upstream security fixes from the PHP project.

Running an end-of-life PHP version can create security exposures, audit concerns, dependency problems, and a harder migration later.

The best approach is to stay current before the situation becomes urgent.

How Seiden Group Can Help

With Seiden PHP+ Server and our support services, we help clients plan PHP migrations, resolve compatibility issues, and keep production environments stable. We also contribute directly to PHP’s future, as Calvin’s RFC demonstrates.

PHP 8.6 brings improvements, while staying current protects your applications, reduces risk, and keeps your IBM i environment ready for the future.

If you are running PHP 8.2 or older releases, or are not sure which PHP versions you have, now is a good time to review your options. Contact Seiden Group to assess your current PHP setup, plan your next migration, and keep your applications secure and supported.

Continuous Integration for PHP Extensions

(Co-written with Alan Seiden)

CI/CDContinuous Integration (CI) ensures that every time a developer commits changes to a version control system such as Git, the code is automatically built and subjected to automated tests.

CI has been invaluable to us. As maintainers of PHP’s PDO_IBM and ibm_db2 extensions, we use CI to ensure high quality across platforms.

Platforms supported by PHP’s extensions for Db2 include IBM i, Unix/Linux, and Windows. While our focus is IBM i, we must ensure compatibility with the others. Reliance on manual testing would introduce the risk of broken builds or subtle bugs. Automation is a must.

In this post, we explain how we use CI principles when building and testing PHP’s Db2 extensions.

Read more

Visual Studio Code, IBM i & PHP

Visual Studio Code 1.35 iconEvery post about Code for IBM i thus far has been how it can be used for writing RPG, CL, COBOL, etc. But what about other languages? Of course, PHP is another one of those very popular languages on IBM i. Calvin wrote a little while ago about how it’s possible to use RDi to write PHP code on the server, which is great. I think we can take it up a notch, which brings us to this post.

Read more

Detecting Memory Leaks in PHP Extensions During Development

memory leakWhen a PHP extension has a memory leak, mysterious crashes can result, forcing users to restart the web server for relief.

As official maintainers of the ibm_db2 and PDO_IBM extensions, we’ve been on a quest to find and eliminate any memory leaks from these popular PHP modules.

With such a comprehensive goal, we needed a strategy. For extensions that have comprehensive test suites we decided that, in addition to reviewing the usual regression tests, why not also use the tests to detect leaks?

What follows is a technical look at how we do it.

Read more

Sending Email from PHP on IBM i

With reliable email functionality being one of the top concerns of IBM i PHP users, we’ve made sure that Seiden PHP+ includes everything you need to send email. The PHP mail() function works well, as do components such as Zend\Mail and PHPMailer.

Over the past couple of years, we’ve been hearing from disappointed PHP users that mail() didn’t work in other community PHP distributions (and some builds of Zend Server). PHP mail() requires an external program that implements the sendmail interface. If your PHP distribution lacked sendmail or equivalent, you might have received a cryptic error message such as:

This article discusses your options for sending email using Seiden PHP+.

Read more

Free PHP on IBM i: from Basic edition to RPMs

UPDATE: Community PHP is now known as Seiden PHP.

open phpLast week, Perforce announced plans to withdraw Zend Server for IBM i “Basic” by June 2021. Filling the gap is “community” PHP for IBM i, installable in RPM format.

Seiden Group has been assisting IBM i clients to adopt Community PHP since its introduction last year. We’ve helped with both first-time PHP installations and migrations from Basic.

Read more

Free and Open PHP on IBM i

Editor’s Note: The information in this article is useful for historical context but is now out of date. We currently recommend Seiden PHP+ as the most reliable PHP distribution for IBM i.

open php ibm iA new flavor of PHP has arrived in IBM i-land. Some call it “free.” Some call it “community.” As described in a recent IT Jungle article, PHP is now available on IBM i as a lean RPM download that does not require Zend Server.

Our friends at IBM and Zend (now Perforce) have packaged a bare-bones PHP edition for customers who want PHP but don’t feel they need to purchase the extra tools of Zend Server.

I’ll share what our open source experts at Seiden Group have learned as we’ve installed and optimized both traditional Zend Server and “open” PHP for our customers.

Read more

CIO Summit Features DB2 for i Briefing with IBM’s Scott Forstie

Scott Forstie Alan Seiden

Scott Forstie (left) with Alan Seiden at a previous CIO Summit

In recent years, Db2 for i Business Architect Scott Forstie and his team have rapidly strengthened the IBM i database, improving the sophistication of its SQL query engine, and adding to its galaxy of IBM i services. What’s more, they have several years’ worth of new enhancements in the pipeline.

CIOs and IT Directors can meet Scott at the CIO Summit on March 25, 2019, Charlotte, North Carolina, for an IBM i strategy briefing.

Read more

Calling procedures and service programs with the PHP Toolkit for IBM i

Calling procedures in RPG service programs, including getting the return value, is a powerful feature of the PHP Toolkit. The sample script below demonstrates how it’s done.

Note: Make sure your procedure name is 100% correct. It is case-sensitive. If you get an error, run the following command (replacing LIBNAME/PGMNAME with your library and program names) and look for your procedure name in the output. The command:
DSPSRVPGM SRVPGM(LIBNAME/PGMNAME) DETAIL(*PROCEXP)

The example below includes ‘boilerplate’ code to show best practices for connecting to the toolkit and checking for a successful connection. The illustration of how to call a procedure is in the second half.

For more information on the toolkit, see our toolkit information page or get in touch.

ZF2 and DB2 for IBM i

I’d like to address questions about DB2 support in Zend Framework 2.x. Because I helped create the IBM i-friendly DB2 adapter for Zend Framework 1.x, I’ve followed the development of a similar adapter for ZF2.

(updated January 30, 2013, upon the release of ZF 2.1)

Q. Does ZF 2 include an adapter for DB2?
A. Yes! Starting with ZF 2.1, which was released today.

Q. Is Alan’s IBM i-friendly DB2 adapter for Zend Framework 1.x needed in 2.x?
A. No. Because ZF’s Zend_Db equivalent in 2.x works differently than in 1.x, my 1.x component is not needed in 2.x.

Q. Does ZF 2.1’s DB2 adapter work with IBM i?
A. Yes! Please try it and provide feedback to the ZF team.