Web performance webinar today

Hope you can join me for “Web performance first aid,” a webcast for the COMMON user group. The webcast will be recorded and archived for future listenings as well.

The webcast is for COMMON members, so anyone wanting to hear it needs to join COMMON.

I based the presentation on my consulting practice that helps ensure high performance for PHP and Zend Framework applications on IBM i. Good performance is critical for customer acceptance of web sites and mobile applications.

Webcast link: http://www.common.org/index.php/webcasts/upcoming-webcasts.html

Anyone wishing to see just the slides can do that on my site: http://alanseiden.com/presentations and look for “Web performance first aid.”

Before you remove Zend Core from your IBM i

If you’ve installed Zend Server for IBM i and are planning to remove the older Zend Core for i5/OS, first check that Zend Core’s version is at least 2.6.1.

Zend Core must be at 2.6.1+ because if you uninstall version 2.6.0 or lower,  portions of Zend Server will be uninstalled as well. Therefore, update your old Zend Core to 2.6.1+ before uninstalling.

Resources

We’ve been named a Top 10 IBM i blog

This blog, alanseiden.com, has been named to the “Best i Blog Bets” top 10 list by Alex Woodie, Senior Editor of IT Jungle.

Thank you to Alex for this honor. This site will continue to offer articles, presentations, event listings, and news about PHP, Zend Framework, IBM i, and other topics of interest to the PHP/i community.

Zend/PHP 2011 Photos, Part 1 (IBM i)

IBM i had a solid presence at ZendCon, the Zend/PHP conference. IBM itself was a sponsor and staffed a booth (Tim Rowe and Tony Cairns). Here are a few photos from the conference. I’ll post more when I get time.

IBM i for Business / PHP pin

PHP/IBM i pin given out at IBM booth at ZendCon 2011

Chris Pharo from CrossPointe LLC's UnCon presentation showing green screen and PHP webified version

Chris Pharo from Crosspointe, LLC, demonstrating how their "TERMS 2020" school district ERP package evolved from a green screen interface to PHP/web, all on IBM i

Alan Seiden with elePHPant at ZendCon 2011

Alan with elePHPant

Zend Framework DB2 adapter for IBM i

I recently received a question about how to use DB2 with Zend Framework on IBM i. Thomas wrote:

I would like to start with Zend Framework on i5 [IBM i] with Zend Server and ZF’s DB2 database adapter. I got this error message:
Qualified object name SYSCOLUMNS not valid. SQLCODE=-5016

I told Thomas about an improved DB2 adapter, optimized for IBM i, that I’d created in cooperation with Zend. Its usage is explained in my presentation, “From Zero to ZF,” on my Presentations page: https://www.seidengroup.com/presentations/.

Thomas wrote back to say this adapter worked perfectly for him, eliminating the error and improving performance. I believe this DB2 adapter (or something similar) will eventually be included with Zend Framework 2.0, but until then, it works well as a custom adapter.

PHP performance tip: disable unused extensions with Zend Server

Whenever I’m brought in to improve the performance of a PHP application, an easy change I make is to disable any PHP extensions that the application does not use. PHP extensions are code libraries written in C that add to PHP’s native functionality. Examples of popular extensions on IBM i are ibm_db2 and curl.

Boost performance by disabling unneeded extensions

I’ve noticed that Zend Server ships with most extensions enabled, presumably so that developers won’t have to see “extension not enabled” error messages. While the default configuration is fine as a starting point, developers should understand that each extension requires memory when loaded. When every bit of performance counts, it’s best to disable the unused extensions. Note: don’t disable anything till you read Several Extensions to Keep Enabled.

Managing PHP extensions

To manage extensions, Zend Server provides the “Server Setup / Extensions” tab. Each extension can be enabled or disabled with its “Turn on” or “Turn off” links. Changes do not take effect until the “Restart PHP” button is clicked.

Zend Server PHP extensions management page

Zend Server's Extensions page where PHP extensions are managed

Storage location for extension settings

Zend Server stores extension settings in a set of .INI files, one file per extension. On IBM i, the files are located in /usr/local/ZendSvr/etc/conf.d. Before making large-scale changes, you may wish to back up this folder. Then, if you discover you were overzealous in disabling extensions, you can compare the contents of conf.d with your backup to find out where you went wrong.

Several extensions to keep enabled

In addition to whatever extensions are required by a given application, I’ve found that several extensions are required by Zend Server itself. Do not disable these. So far, I’ve found that Zend Server requires these extensions to be enabled:

  • ctype
  • iconv
  • json
  • pdo_mysql
  • simplexml (used by new open source toolkit)
  • zip

If you accidentally disable an extension required by Zend Server, which you’ll discover when Zend Server fails to start properly, you must re-enable the extension in the correct .INI file and then restart Zend Server from a command line or menu. On IBM i, the command is STRTCPSVR SERVER(*HTTP) RESTART(*HTTP) HTTPSVR(ZENDSVR).

More performance tips to come

I plan to write about more techniques to improve PHP application performance, particularly on IBM i, that I’ve found to be effective in my consulting experience. Performance is a critical part of user experience that developers should not ignore. In addition to this practical need for good performance, I can speak for myself, at least, in saying I feel great satisfaction when I can take a slow application (sometimes the victim of an underpowered server) and, step by step, help it run faster and faster, till the performance is at least acceptable and sometimes quite fast. More to come.

How to learn Zend Server and PHP on IBM i

A customer who is also an IBM business partner asked me how to learn more about Zend Server and get a basic understanding of PHP. He has already installed Zend Server for IBM i.

I suggested these steps:

NEUGC and COMMON are coming right up

Next week I’ll be in Framingham to present at the Northeast System i Users Groups Conference (NEUGC). In early May,  it’s Minneapolis for the COMMON 2011 annual meeting. Here are the dates and places of these great conferences:

NEUGC: April 11-13, 2011, in Framingham, Mass.
COMMON: May 1-4, 2011, in Minneapolis, Minn.

At each conference I’ll be presenting 6 talks:

  • 4 about PHP on IBM i: web services, batch jobs, Zend Framework, and my research into best practices for db2
  • one about making web development easier with free tools that run in a web browser (a fun one)
  • one non-technical talk about how to stay healthy despite years of professional computer use (fun and interactive)

Both conferences have an exciting lineup of speakers and topics. I plan to learn a lot and meet many great people. If you are there, please say hello.

SSH on IBM i

Secure Shell (SSH), a network protocol used every day by software developers, provides a fast, secure means to transfer files and submit commands to remote servers.

Zend Studio 8.0‘s SSH support allows users to save their PHP scripts onto remote servers such as IBM i.

How to set up SSH on IBM i

SSH runs as a server program, the SSH daemon (sshd). Before sshd can run, it requires a set of public/private key pairs.

Instructions for creating the key pairs and starting the server are given below.  There are two versions of instructions, depending on the version of OS.

IBM i v6.1 and higher: one step creates public/private keys (if needed) and starts server

STRTCPSVR *SSHD

V5R3 and V5R4: two steps are required

1. First, create the public/private key pairs (only needs to be done once):

CALL QP2TERM
ssh-keygen -t rsa1 -f /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_key -N ""
ssh-keygen -t dsa -f /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_dsa_key -N ""
ssh-keygen -t rsa -f /QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-3.5p1/etc/ssh_host_rsa_key -N ""

2. Then start sshd (“&” means to run in background):

/usr/sbin/sshd &
Either way, the daemon should now be running. To check, type NETSTAT *CNN on an ordinary 5250 command line. Look for a local port called “ssh” or 22.
For more information about setting up SSH, including prerequisites, see this “Young i Professionals” SSH wiki article and this old but still useful SSH article from Zend’s Knowledge Base.

Zend Framework webinar this Wednesday

On March 9, 2011, I’ll present a free webinar about how to create a Zend Framework project on IBM i. The webinar is at 9am PST, 12pm EST. Sign up here: http://www.zend.com/en/company/news/event/790_webinar-your-first-zend-framework-project-on-ibm-i

Here’s the complete list of my upcoming talks.