MySQL is still alive on IBM i

Over the past week I’ve received several emails, ranging in tone from panicked to angry, seeking clues to the fate of MySQL on IBM i. The database vendor Oracle—recent buyer of Sun Microsystems, and therefore of MySQL—has issued an end-of-life notice for MySQL distributions on IBM i.

IBM i’s primary database is still db2, but many in the community have grown to trust MySQL when deploying MySQL-based applications such as WordPress, Drupal, Joomla, and SugarCRM. Some have trusted MySQL enough to let it into their inner application sanctum, using the IBM DB2 for i Storage Engine (IBMDB2i) to share data between MySQL-based applications and traditional db2-based apps and languages (think RPG).

Now that trust seems to be shattered.

Fortunately, MySQL is an open source product. Zend is still distributing existing versions of MySQL for i, and even if Oracle ceases to create new distributions, someone else can pick up the slack.  An article in IT Jungle quotes IBM’s Allison Butterill and Ian Jarman as offering hope that IBM can find a way to maintain MySQL as an officially supported database, possibly with Zend’s help. It’s all speculation at this stage, but IBM seems to be considering the alternatives and wants to choose the right path.

Forgive me if I seem unduly sanguine about the situation, but many of us ran MySQL on the i before any of these official distributions existed. Back in 2005, the now-defunct site i5php.net hosted distributions of both PHP and MySQL that were compiled for for the IBM i (called the i5 at that time).

The dust hasn’t settled yet. Anything can happen. Yet I believe that MySQL’s open source licensing will, in the end, rescue it from Oracle’s decisions, allowing MySQL to remain viable on the IBM i—with the help of those who care.

Posted in db2, IBM i, iSeries, MySQL, Open Source, System i | 12 Comments

IBM i was never affected by (quickly patched) PHP floating point vulnerability

Yesterday an IBM i customer of ours emailed me an announcement he’d received from Zend concerning a vulnerability in PHP concerning floating point numbers. Zend also included instructions for installing their “hotfix.”

Fortunately, IBM i was never affected by this vulnerability, which stemmed from a “design flaw in the x87 floating point unit that is part of an old Intel X86 chipset,” affecting only Intel-based 32-bit PHP builds, according to this NetworkWorld article about the issue.

Here is a table supplied by Zend that shows which platforms were affected (emphasis on non-vulnerability of IBM i added by me):

Platform Vulnerability
Windows YES
Linux (using 32-bit PHP build) YES
Linux (using 64-bit PHP build) NO
Mac OS NO
IBM i NO
Posted in IBM i, iSeries, PHP, System i, Zend Server | 1 Comment

ZendCon 2010

The 2010 “Zend/PHP Conference” welcomed the full range of the PHP community: open source contributors, small businesses, practitioners of diverse technologies and platforms, including Microsoft Windows, Linux, and IBM i, and the largest names in technology and business: Adobe, GE, the New York Stock Exchange. All these contributed energy and momentum to ZendCon.

I presented two talks (slides: http://alanseiden.com/presentations) and attended many more (slides: http://joind.in/event/ZendCon2010), given by some of the top names in IBM i and PHP. Beyond the great value of scheduled sessions, though, ZendCon offered even more.

As noted by Zend’s co-founder Andi Gutmans in his opening address, ZendCon’s value comes not only from scheduled sessions but from those unscheduled conversations in the hallway, at meals, and at evening networking events. ZendCon is about sharing knowledge, solving problems, and building relationships.

Personal highlights:

  • Alison Butterill’s presentation about IBM’s strong commitment to PHP
  • Susan Gantner’s sessions about interweaving RPG, PHP, and MySQL’s DB2 Storage Engine
  • Meeting Sam Pinkhasov from Zend’s R&D lab. He has such great knowledge that one time I followed him all around the conference center and into the elevator, peppering him with questions, before I finally let him go on the 5th floor.
  • The speaker’s reception, IBM i reception, and Disney-sponsored reception
  • Helping two people with their Apache configurations on IBM i. I continued to work on one of their configurations for 15 minutes after the lights were turned out, finding the command keys by feel alone. (Does that make me a geek?)
  • The Zend Framework roundtable where I got to ask the developers my burning questions.

I want to thank my employer, Strategic Business Systems, Inc., for allowing me to come and speak at ZendCon.

Below are my photos from the conference. I hope to return to ZendCon next year and to see many of you there!

P.S. For those of you in the New York area, come see me co-lead a roundtable recap of the conference at NY-PHP on November 23, 2010.

Andi Gutmans giving his opening keynote at ZendCon 2010

Andi Gutmans giving his opening keynote

Ray Taylor and I chatting before my web services talk at Zendcon 2010

Ray Taylor and I chatting before my web services talk

elePHPant with a fan at ZendCon 2010

elePHPant with a fan

IBM i networking event at ZendCon 2010

IBM i networking event

Ryan Watkins and Alison Butterill at the IBM booth, Zendcon 2010

Ryan Watkins and Alison Butterill at the IBM booth

Leverage the Power of IBM i Zend PHP button

"Leverage the power of IBM i" Zend PHP button

Susan Gantner speaking about RPG + PHP at ZendCon 2010

Susan Gantner speaking about RPG, PHP, and MySQL

Posted in Events, IBM i, iSeries, PHP, SOAP, System i, Web services, Zend Framework | Tagged , , | Leave a comment

Rocking at COMMON

COMMON’s fall conference and expo in San Antonio was the first of its kind, and a first for me as well. It marked my debut as a speaker for COMMON, as I presented three sessions about PHP on IBM i.

The conference brought the Power Systems and IBM i community together for learning and networking. I met many great people and caught up with industry friends.

After each day’s information-packed sessions, we gathered to relax and socialize.

A social highlight for me was the “Power Down” evening on Tuesday, October 5. The organizers had set up the Wii “Rock Band” game. This photo shows me on “drums,” Rich Nemerovsky singing, and Brian May playing “guitar.” I think Brian can actually play.

Drums, Alan Seiden; vocals, Rich Nemerovsky; guitar, Brian May, playing the "Rock Band" Wii game at Fall COMMON conference, San Antonio, Texas, October 5, 2010

Alan Seiden, Rich Nemerovsky, and Brian May playing Wii "Rock Band"

Posted in Events | 3 Comments

Zend Framework named among “Best of Open Source Software” for 2010

Infoworld has awarded Zend Framework a “Bossie,” naming ZF one of the top 10 open source application development tools of 2010.

Infoworld says:

The Zend Framework, from the creators of the PHP runtime, combines a business-friendly open source license with a set of high-quality, object-oriented component libraries for building serious Web applications. The loosely coupled components extend from authentication and session management to Web services and APIs to the popular Web 2.0 sites, and they include everything in between. You’ll also find components for the MVC (model-view-controller) design pattern and “RAD” tools to generate your project structure and populate it with MVC components, but you’re never locked in. You can take it just as much as you need and leave the rest.

I agree that ZF’s “use at will” architecture provides major benefits. Last week I helped a client set up a SOAP client and server using Zend_Soap_Client and Zend_Soap_Server, all from within a normal PHP script. While I normally do use ZF’s full MVC architecture, it’s not required.

Congratulations to Zend Framework!

Posted in PHP, Zend Framework | 4 Comments

VTMUG friends

I had a great time yesterday at the annual conference of VTMUG (Vermont Midrange Users Group).  I gave two talks about PHP on IBM i. I got to watch Skip Marchesani give a talk about the IBM i’s SQL Script Center, and John Valance speaking about Web 2.0.

I wanted to see Jon Paris and Susan Gantner’s presentations but conflicting time slots prevented that. I’ll try to catch Susan’s talk at the Zend/PHP Conference, where I’ll also be speaking.

This photo shows us relaxing after a satisfying day of teaching and learning at VTMUG.

Relaxing at the end of VTMUG's annual conference in South Burlington, Vermont

Relaxing after VTMUG's annual conference in South Burlington, Vermont

Posted in Events, IBM i, iSeries, PHP, System i | Tagged | Leave a comment

My upcoming PHP talks this fall (2010)

Please join me for my IBM i-focused PHP talks this fall. I’ll present these topics:

  • web services with PHP and Zend Framework
  • batch and command-line tasks with PHP
  • RPG-based 5250 applications as the basis for new web applications

…all focused on PHP on IBM i!

Here are the dates, locations and web sites with more information:

Sept 28: Vermont Midrange Users Group (VTMUG) education day, South Burlington, Vermont

Oct. 3-6: COMMON Fall Conference, San Antonio, Texas

Oct. 26: OMNI Users Group education day, Chicago suburbs

Nov. 1-4: Zend/PHP Conference (ZendCon 2010), Santa Clara, California

I look forward to meeting many of you at these great conferences and education days.

Posted in Announcements, IBM i, iSeries, PHP, SOAP, System i, Web services, Zend Framework | 2 Comments

Two techniques for retrieving SQL from Zend Framework’s database components

Zend Framework’s database components can build and run queries without the developer’s having to touch the underlying SQL. Sometimes, though, developers need the SQL for diagnosing problems or to look for efficiencies. That SQL can be accessed with a choice of two main techniques:

getQuery()

getQuery() is a method of Zend_Db_Profiler and seems, along with getLastQueryProfile(), to be the standard advice for retrieving SQL of a recent query:

query = $profiler->getLastQueryProfile();
echo $query->getQuery();

Yes, getQuery() works, but what if I’m not using the profiler, or I need to retrieve SQL before a query has run?

__toString()

The “magic method” __toString() is simple and can be used either before or after the query is run. When applied to a Zend_Db_Select object, it generates an SQL string.

From the Zend_Db_Select documentation:

$select = $db->select()->from('products');
$sql = $select->__toString();
echo "$sql\n";

// The output is the string:
// SELECT * FROM "products"

__toString() is simple to use, yet is often forgotten when discussing how to retrieve SQL from Zend_Db_Select. I recommend it.

Posted in PHP, Zend Framework | 9 Comments

Maximize Zend Server PHP performance with Apache compression

Does your site run as quickly as it could? It’s worth your time to find out. Faster web sites sell more products, improve user satisfaction, and even rank higher in Google searches.

Note: This tip was written for IBM i but could be adapted for other platforms as well.

Benefits of Zend Server

If you have upgraded from Zend Core to Zend Server for IBM i, you have already received several performance improvements: bytecode acceleration (Zend Optimizer+), the elimination of Zend Core’s proxy web server, and configurable Data Caching. If you upgraded from Community Edition (CE) to full Zend Server, you also get monitoring, Page Caching, and Job Queue functionality.

Compression adds even more speed

IBM’s Apache web server provides an additional way to speed up your Zend Server for IBM i pages. You can compress PHP output, javascript, style sheets, and other text-based content. The compressed output will automatically be decompressed and interpreted properly by all modern web browsers. My tests show a speed improvement of 10-50% from this easy technique.

How to enable compression in 3 steps

1. Edit ZENDSVR’s Apache configuration file, located at /www/zendsvr/conf/httpd.conf. This is a simple text file, so you may choose from several editors: IBM’s HTTP Server Admin GUI at port 2001 (if *ADMIN is started), the WRKLNK/EDTF command, or your favorite text editor (I use EditPad Pro).

2. Add the following two directives to the httpd.conf’s main section:

# Load IBM i's module that performs compression
LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM

# Specify what to compress (example: php, json, css, javascript, static html)
AddOutputFilterByType DEFLATE application/x-httpd-php application/json text/css
application/x-javascript application/javascript text/html

3. Restart Zend Server using the handy Restart PHP button button or STRTCPSVR SERVER(*HTTP) RESTART(*HTTP) HTTPSVR(ZENDSVR)

Measure the improvement

I ran before-and-after tests using a sample script included with Zend Server for IBM i: http://your-server:10088/Samples/SQL_access/DB2_SQL_example.php.

Before compression: 31kb, loaded in 250ms (milliseconds). See the Firebug report below (Firebug is an optional add-on for Firefox and is not required.)

Zend Server output without compression

Without compression, this page was 31kb and loaded in 250ms

After compression: 4.4kb; loaded in 109ms. That’s only 14% of the size and 50% of the time! See the screen shot below.

after compression: only 4.4kb and loaded in 109ms

after compression: only 4.4kb and loaded in 109ms

I highly recommend that you give output compression a try. Your Zend Server for IBM i pages will fly!

For more information on browser output compression, see: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

Posted in Apache, IBM i, iSeries, Performance, PHP, System i, Web development, Zend Framework, Zend Server | Tagged , , , , | 5 Comments

Zend Studio 7.2.1 faster, more reliable

I just upgraded my copy of Zend Studio for IBM i from 7.0.2 to 7.2.1. Big improvement!

My use case: I typically use Zend Studio’s “Remote Server” facility to connect to the IBM i over FTP. With 7.2.1, FTP-based files now open and save much faster than before. In addition, the FTP connection no longer randomly disconnects the way it used to.

I recommend upgrading to 7.2.1, especially for anyone using FTP. It provides a smooth, hassle-free user experience.

Get Zend Studio here: http://www.zend.com/en/products/studio/downloads. Scroll down to the edition you need.

Note: this product is still free to users of IBM i, a nice benefit of Zend’s relationship with IBM.

Posted in IBM i, iSeries, PHP, System i, Zend Studio | 2 Comments