Entries by Calvin Buckley

Running the x86 IBM i ODBC driver on ARM Linux with Rosetta

I recently did some research on how to run the IBM i ODBC driver under Linux on newer macOS architecture and thought I’d share what I learned. Over the last few years, macOS has changed from x86 (Intel) to ARM architecture. IBM has kept pace by updating its IBM i ODBC driver to support ARM on macOS as of version Developers who use a Linux virtual machine, however, will note that there is no ARM version of the Linux driver available yet. While an ARM-native version of the driver would be ideal, Mac users running a Linux virtual machine…

Basic Authentication Credentials are Encrypted with TLS

You may have heard claims that HTTP “basic” authentication (classic user/password popup prompt or via an API call) leaves credentials unencrypted and exposed. While it’s true that basic auth itself doesn’t encrypt credentials, this doesn’t matter in practice. Modern sites and APIs should be using HTTPS, which encrypts everything over the wire, protecting basic authentication credentials in transit. This article will explain why that’s the case.

Continuous Integration for PHP Extensions

(Co-written with Alan Seiden) Continuous 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…

ODBC Connection Strings for IBM i Db2

As ODBC gains popularity for IBM i database access, developers of web applications and APIs need information on defining ODBC database connections. This article demonstrates tips and techniques for effectively using ODBC connection strings in all programming environments, including popular languages such as PHP, Python, and Node.js. For an example of how connection strings are used in a program, see How to Query IBM i Data with PHP and PDO_ODBC.

New IBM i extension for PHP

One of the open source components we’ve built at Seiden Group is a new extension to enhance PHP’s integration with IBM i. Although most business requirements are met by the existing ibm_db2 and PDO_ODBC extensions plus the PHP Toolkit, the new php-ibmi makes it easier to accomplish several (formerly) difficult or impossible tasks—especially for tool vendors, and when troubleshooting. We’ve built six functions thus far, with the possibility of more in the future. Let us know what you think.

Porting a Cross-Platform C++ Application to Mac

An article about building C++ software for macOS might seem out of the ordinary for Seiden Group, a company that focuses on IBM i, but we have a good reason: we’ve been enhancing open source tools for PHP and Python. One of these is KCachegrind, an open source visualization tool that integrates with PHP’s Xdebug’s powerful application profiler and Python’s cprofile. While KCachegrind and its cousin QCachegrind are easily available for Linux, only very outdated builds were available for Windows, and none at all for macOS. To rectify the situation, we’ve been making enhancements; providing QCachegrind builds for the community;…

ibm_db2 & ODBC Run Side-by-Side in Seiden CP+ PHP

In the past, PHP on IBM i implementations demanded loyalty to a single database connection style: either the classic extensions (ibm_db2 / PDO_IBM) or the ODBC extensions (odbc / PDO_ODBC). Operating system limitations prevented both types from being loaded at the same time. In July 2021, we overcame those limitations in Seiden CommunityPlus+ PHP. Yes, now the classic PHP database extensions can run side-by-side with ODBC! As of this writing, you’ll find this feature exclusively in CP+ PHP. When you install Seiden CP+, all db2 extensions (ibm_db2, PDO_IBM, odbc, and PDO_ODBC) are enabled by default.

No, Apache Isn’t Vulnerable to the Log4j Vulnerability

Updated December 19, 2021 The Log4j Java library has been in the news recently. The details of vulnerability CVE-2021-44228 have been well documented by others, but to summarize, it allows arbitrary code execution through maliciously crafted messages. These messages cause the Java virtual machine to look up classes from an LDAP server and load them. This is obviously not good, but unless you’re familiar with Java, you might be concerned what is and isn’t vulnerable; this article aims to clarify that.

PHP 8.1 Released for IBM i

Good news everyone! In cadence with the release of PHP 8.1 by PHP.net last week, companies running PHP on IBM i can now download PHP 8.1 for use with their own applications. According to this briefing with IBM i’s Open Source Business Architect, Jesse Gorzinski, staying current with PHP is a best practice for many reasons—for security and security audits, to fix deprecated code before you dig a huge technical debt hole, to keep your PHP environment running smoothly, and so on. I’ll cover how to access the IBM i version of PHP 8.1 later in this post. First, though,…

Optimize Your IBM i Web Application Using FastCGI

(Co-written with Alan Seiden) FastCGI speeds up web applications by pre-starting and managing jobs for popular languages such as PHP. FastCGI can be configured to handle any language that supports the FastCGI interface, as shown in this FastCGI configuration for node.js. When it comes to PHP, you can trust tools such as our CommunityPlus+ PHP siteadd to set good FastCGI defaults. You can also customize fastcgi.conf to accommodate higher traffic, multiple environments, and to solve problems. Read on as we explain how FastCGI works and how to configure it.