Entries by Calvin Buckley

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 Seiden 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.

Issues with Port 10080

You might have heard that the major browser vendors were planning to block port 10080 – the port used by Zend Server through ZS 8  (PHP 5.6). Firefox made the first move, then Chrome followed. We have been receiving support requests on this issue since April 2021. Why did the browser vendors block port 10080, and what can you do to get your site working again?

Using PHP with Rational Developer for IBM i

If you’re using Rational Developer for i (RDi) for most of your development tasks, you might want to use it for PHP, too. RDi is based on Eclipse, so we can use the Eclipse PHP Development Tools (PDT) with RDi. However, there are some additional steps to take and quirks to be aware of. This post provides the steps for a trouble-free installation of PDT, with tips to resolve common issues.

Storing Passwords Safely

If your application deals with user accounts, it has to deal with passwords. Storing passwords in plain text would be a bad idea; a data breach could allow an attacker access to every account. The obvious answer is to encrypt the passwords. However, using cryptography without understanding could give you a false sense of security—if you make the inappropriate choice, you could make things easier for an attacker without realizing it. This article will focus on getting you up to speed with the best ways to use cryptography to secure passwords.

How to Measure Python Speed with QCachegrind

Want to know which parts of your Python program take how much time? Which parts are slow, and how often they are called? Python includes tools to measure speed, but it’s not easy to visualize their meaning. To make it easier, the QCachegrind tool graphically displays profiler output from a variety of languages. We first introduced our build of QCachegrind as a PHP tool, but you can put your Python programs under the QCachegrind microscope as well.

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.

Detecting Memory Leaks in PHP Extensions During Development

When 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.