Reading and Writing Physical Files in a Shell using Rfile

Want to read source member data from within an IBM i shell environment, such as SSH, QShell, or QP2TERM? Need to copy records from a text file to a physical file? Want a quick way to upload a save file without needing FTP?

IBM i’s Rfile command can do all these things easily. Rfile is designed to be easy to integrate into scripts, so it’s a great tool to have at hand.

Read more

Node.js and IBM i – Getting Started Guide

This guide will outline writing your first Node.js application. Node.js is a packaged version of the V8 Javascript engine, created by Google and shipped in Chromium. Although Node.js is cross-platform, specific tips for IBM i are given in section 8.

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

Free QCachegrind Enables Application Profiling for PHP Developers

IBM i developers now have an alternative to proprietary data visualization tools to pinpoint potential bottlenecks in PHP, Python, and Node.js code. QCachegrind, an open source tool developed by KDE, turns raw application profiling data into meaningful graphs and visualizations that highlight a program’s most time-consuming functions.

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 CommunityPlus+ 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 CommunityPlus+ PHP.

Read more

Welcome Back, MariaDB!

Getting Started with MariaDB on IBM i

MariaDBMySQL and MariaDB have long been databases used in the Linux world for popular web apps in PHP and other languages. The collective development components—Linux, Apache, MySQL and PHP—are often called the LAMP stack. When PHP was released on IBM i in 2006, the combination of IBM i, Apache, MySQL and PHP became known as the iAMP stack.

Read more

Porting Extensions to PHP 8

open phpPHP 8 has been the biggest change to PHP in years. While PHP 8’s JIT compiler gets most of the publicity, more significant to most developers would be PHP 8’s changes that encourage better coding practices. PHP 8 pushes developers to use clearer syntax and is stricter with problematic code.

While the PHP runtime itself has improved, what about extensions such as ibm_db2? What changes do extension developers need to make to adapt to PHP 8? As maintainers of the ibm_db2 and PDO_IBM database extensions, we’ve learned what it takes to make PHP extensions compatible with PHP 8.

Read more

Getting Started with SSH for IBM i

SSH for IBM iSecure Shell (SSH) provides the best environment for installing, managing, and running open source software on IBM i. Among SSH’s advantages over QSHELL and QP2TERM: IBM i’s SSH command line works just like SSH on Linux or Windows, helping the IBM i platform appeal to younger developers and admins. Supporting a wide range of Unix programs and open source software, such as git, SSH is our go-to terminal interface for open source and PASE. This article covers how to set up SSH and use it to connect to IBM i servers.

Read more

[VIDEO] Community PHP is Open for Business

IBM i for Business

Recently Alan presented a session on the state of PHP on IBM i at the RPG & DB2 Summit, including community PHP and our CommunityPlus+ PHP offering. The session recording below also shows a live demo of GRAR’s award-winning website, migrated to CommunityPlus+ PHP with excellent results.

Read more

Looking at Network Connections on IBM i with NETSTAT

If you’re running web applications, database servers, FTP, SSH, or other network programs, the IBM i NETSTAT command can tell you what is connecting to your system, which ports are in use, which programs are listening for network connections, and more.

Read more