PHP dynamic programming language

Git for All Your Code

IBM i + GitGit has become the de facto standard for open source version control. Nevertheless, while your team may be using Git for open source code, your traditional IBM i programs and other code may use no version control at all, or be stuck in a repository that is difficult to access.

In this article, we’ll cover why you might want to move code to Git and suggest tools that make the move practical for IBM i teams.

Read more

Visual Studio Code, IBM i & PHP

Visual Studio Code 1.35 iconEvery post about Code for IBM i thus far has been how it can be used for writing RPG, CL, COBOL, etc. But what about other languages? Of course, PHP is another one of those very popular languages on IBM i. Calvin wrote a little while ago about how it’s possible to use RDi to write PHP code on the server, which is great. I think we can take it up a notch, which brings us to this post.

Read more

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?

Read more

Using PHP with Rational Developer for IBM i

open phpIf 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.

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

Storing Passwords Safely

Steal passwordIf 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.

Read more

Set Up PHP Servers in Seconds with Siteadd

A modest but powerful utility “stole the show” during last week’s Lunch & Learn with Alan Seiden and Paul Tuohy. Packaged with CommunityPlus+ PHP, Seiden Group’s siteadd creates an Apache HTTP instance and a FastCGI configuration customized for your needs. In seconds, you’ll be able to launch a sample PHP page to test your new web instance.

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:

sh: -t:  not found

This article discusses your options for sending email using CommunityPlus+ PHP.

Read more