New IBM i extension for PHP

PHP on IBM iOne 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.

Read more

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; and documenting how to use QCachegrind with Xdebug.

We’ve learned how to build cross-platform applications that work well on a Mac. This article documents many of the challenges we faced and solutions we found.

Read more

How Update-Alternatives Manages Multiple Versions of Python, Node.js, and other Open Source Packages

parallel versionsAfter a friend installed Python 3.9 side-by-side with Python 3.6, he asked, “I noticed that the newer version, Python 3.9, became the default on my IBM i system. How did the default version get set?” We explained how IBM used the update-alternatives program to set the default version of Python and other open source software packages.

Read more

Troubleshooting “already been bootstrapped” Message on IBM i

Setting up the open source environment on IBM i from Access Client Solutions (ACS) is usually easy, but sometimes you can run into problems. The most common error is when ACS claims that the environment is already set up (“bootstrapped”), when in fact it isn’t.

Read more

Solving “curl#6 – getaddrinfo() thread failed to start”

Curl-logoIf you download files onto your system using PHP, Yum, RPM, or other tools, there’s a good chance curl is involved.

The version of curl provided in IBM i PASE uses multiple threads to speed up common tasks such as DNS lookups. When threading support is not available, however, curl fails.

Read more

Integrate Python into CL & RPG on IBM i – 2021 Update

python trainingPython on IBM i has proven itself as a tool for building utilities to create/read Excel files, transfer data, automate processes, call REST APIs such as Salesforce and ServiceNow, monitor applications, and more. What was missing was an easy way to use the power of Python from CL and RPG.

In 2019 we introduced you to the PYRUN command for running Python scripts from CL and RPG programs.

In this post we introduce you to QSHPYRUN, the next generation of PYRUN and part of Richard Schoen’s open source QShell on i Library – QshOni. QSHONI makes it easy for traditional CL and RPG programs to call Python utilities and use their output. This is supported via the QSHPYRUN command. QSHONI also supports general calls to other QShell, PASE and bash calls via the QSHEXEC and QSHBASH commands. This means QSHONI commands support calling Python, Node, PHP, Java and all things open source, making QSHONI much more versatile than the standalone PYRUN command was. The QSHONI commands can safely live side-by-side with the PYRUN command because they live in different IBM i libraries. This allows for migration to QSHPYRUN to  happen as needed. Read more

How to Validate Self-Signed SSL / TLS Certificates from IBM i

(Co-authored by Gautier Dumas and Calvin Buckley)

When we use open source languages such as PHP, Python, and Node.js on IBM i to help companies build and access APIs and other resources, we expect these resources to be protected with encryption (for example, the https:// protocol). Further protection is provided by an SSL / TLS certificate that can be authorized, or signed, by a popular certificate authority such as Verisign,  Comodo, or Let’s Encrypt, or signed internally by the company itself.

Self-signed certificates are most useful in situations where public trust of a certificate is unnecessary, such as:

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.

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