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

Q&A: IBM i ODBC Driver

Stephanie Rabbini

I recently caught up with Seiden Group CTO Stephanie Rabbani about the ODBC driver that’s quickly becoming standard for open source and web connections on Db2 for i.

Read more

Free PHP on IBM i: from Basic edition to RPMs

open phpLast week, Perforce announced plans to withdraw Zend Server for IBM i “Basic” by June 2021. Filling the gap is license-free “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

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.

PHP on IBM i (and me) at ZendCon 2009

This year’s ZendCon (Oct. 20-22, 2009, in San Jose, Calif.), the premier PHP conference, features several presentations about developing with PHP on the IBM i, including one by me!

Come hear me speak about “Zend Framework for Enterprise PHP on IBM i” on Tuesday, Oct. 20, 2009, at 4pm.

For details, go to http://www.zendcon.com.

Speaker: Zend/PHP Conference 2009