22
Sun, Dec
3 New Articles

Zend Server: The Latest PHP Offering for IBM i

Web Languages
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

IBM is shipping Zend Server with V7.1. For you, that means enhancements in configuration, performance, code-tracing, and more.

 

If you've been keeping up with the evolution of PHP on the IBM i, you may have heard rumors about a new PHP server from Zend. If you've really been staying current, you may have already downloaded and installed a beta version (I did!). If not, you're in for a real treat. Included with release 7.1 of IBM i is the new Zend Server 5 for IBM i. This updated product has many advantages over Zend Core and Platform, not the least of which is the fact that Zend has taken two licensed products and combined them into a single licensed product. But I'm getting ahead of myself.

What's the Big Deal?

When I heard about the development of Zend Server, my first thought was "What's the big deal?" Zend Core is working just fine for me, so why mess with a good thing? Boy, was I wrong!

 

To begin with, Zend Core (and Platform) had some configuration challenges. If you were not an expert on Apache configuration before you started using Zend Core, you probably became one in relatively short order. With Zend Core, you had to deal with not one but two Apache servers. One of the first things that turned me into a Zend Server evangelist was the fact that the Zend and IBM development team got rid of the need for the Apache server in PASE. The IBM developers created the FastCGI, which made all this possible. All future releases of Zend Server for IBM i will be leveraging the FastCGI interface. So now Zend Server only uses the IBM HTTP Server powered by Apache, and now you have only one server to configure and maintain. Just between you and me, if this had been the only change they made, it still would have been worth making the switch.

 

041410OlenZendServerdiagram

Figure 1: Zend Server uses the IBM HTTP Server powered by Apache.

 

Fortunately, Zend and IBM were more ambitious than that. They also implemented a new administration control interface that is now consistent across all platforms. This is a big plus for IBM i folks because now your Zend Server skill set is transferrable to Linux and Windows. The new administration display includes a Restart PHP button, which resolves the issue of needing to jump back to green-screen mode to stop and start Zend Core when you're using the GUI interface for configuration.

 

Speaking of getting started, did I mention that Zend Server can be installed right alongside your existing Zend Core? Yep, it sure can. The default setting for Zend Server is to listen on port 10088. This will allow you to load and test Zend Server without disturbing any existing applications you're running using Zend Core. The only drawback is that it is not recommended that you run both Zend Core and Zend Server at the same time. The results can be a bit unpredictable. So you can load Zend Server and test your current applications, and when you're satisfied that everything is working correctly in the new environment, you can switch to using Zend Server just by changing it to use port 80.

 

But there are lots more improvements, so let's move on.

What About Performance?

One of the more interesting improvements is in the area of performance. Just the "basic PHP" performance enhancements included in Zend Server are providing between 30 percent and 600 percent better performance, depending on your application. In my own testing of Zend Server, I was getting about 40 percent faster response times on average and nearly 100 percent faster response in my Zend Framework applications. These performance enhancements (known as Optimizer+) are bundled in the Community Edition of Zend Server, so everyone can use them.

 

Additional performance improvements in the subscription version include data caching and page caching. The data caching feature provides access to a set of API functions for caching data. This allows you, as the developer, to cache query results to a shared memory area to improve performance on repeated access. The page caching feature allows you to cache entire pages in cases where the content doesn't change often. All the page caching is set up in the Zend Server administration interface; you don't have to change any code. It's a rules-based setup that will allow you to use a regular expression to determine which pages are cached. This is one of the areas where you can see some of the higher-end performance improvement up in the 400 percent to 600 percent range.

For Developers Only

The monitoring feature available in Zend Platform has been enhanced and included in Zend Server. It still has all of the original functionality (e.g., monitoring for PHP errors, failing DB queries, high memory consumption, failing functions, slow request executions, etc.). However, the UI has been modified to be more user-friendly. Most of the changes here were based on user feedback regarding the Platform version.

 

041410OlenZendServerdashboard

Figure 2: The new monitoring dashboard is so much more user-friendly! (Click image to enlarge.)

 

A feature new to Zend Server is code-tracing. As an IBM i developer, you're probably very used to code-tracing because it's been on IBM i for a long time. This is much the same but with some really helpful enhancements. Using code-tracing can eliminate the need to reproduce a problem. By setting up the code trace to start executing when a specific event takes place, you can capture the information you need to be able to debug an issue as it happens! Code-tracing captures the entire execution flow, including all of the following:

 

  • Output and header generation
  • Function argument and return parameters
  • Execution tree, including function calls and include files
  • Execution time and memory usage for each node
  • Location of errors, exceptions, and Zend Monitor events

 

As all of us know, reproducing an error that occurs in a production environment can be particularly difficult. Properly used, code trace can make it unnecessary. Am I the only one who thinks that's awesome?

 

By opening a trace file, you have the ability to "play back" the sequence of events that led to an error. You have two views available to assist you in doing this. The first is the tree perspective, which allows you to view function-execution flow and examine events leading up to an error. The second view is the statistics perspective. In this display, you can review the execution time, memory consumption, and total number of calls for the functions in your application. You can view the execution time in an aggregated fashion for the entire application or view the details, broken down by each function execution. The same goes for the memory consumption; you can view overall or by function execution. It's easy to see how this could really speed up problem diagnosis and correction time.

 

If you ask longtime IBM i developers what the one thing is that separates IBM i job-handling from that of Linux or Windows, odds are you'll get the same answer from all of them: job queues. Frankly, I don't understand how Windows and Linux get by without job queues…but that's another story. Well, now with Zend Server, you have access to that same functionality for your PHP scripts. You can schedule jobs to be run at a certain time, similar to the IBM i job scheduler. Also, from within a PHP process, you can use an API to spawn another process that will execute in a separate execution queue and therefore not delay the execution of the current script. This process does not use the job queues on your IBM i; it uses job queues within Zend Server. You can still call a PHP process via the IBM i job queues, but by using the new job queue functionality in Zend Server, you get the ability to use the event-logging and code-tracing functions to determine whether the PHP script completed or threw an error. Again, good information to have if something goes awry. Other capabilities included in the job queue feature include the following:

 

  • Managing job priorities
  • Handling job dependencies
  • Checking job status and queue statistics
  • Suspending/resuming recurring jobs and queues (e.g., hold a job and release it)
  • Managing failure-handling and retry control
  • Querying for jobs
  • Passing custom HTTP headers
  • Managing and balancing loads (not really applicable to IBM i environment)

Other Differences from Zend Core/Platform

A few other differences between Zend Server and Zend Core/Platform are definitely worth mentioning.

 

The Java Bridge, which was available previously only in the "for charge" version of Platform is now available in the free Community Edition of Zend Server. I am always happy to get more free stuff.

 

The version of MySQL available to be installed with Zend Server supports the DB2 Storage Engine. If you are unfamiliar with the MySQL database support for DB2, you can find more information at the MySQL Web site. I've seen the DB2 storage engine in action, and it's pretty exciting. If you haven't looked into this, I encourage you to take a few minutes to do so.

 

Lastly, Zend has also included phpMyAdmin in the Zend Server installation to help you administer your MySQL tables. I have been using phpMyAdmin for years (GoDaddy.com provides it as a way for their domain host accounts to administer MySQL tables) and look forward to using it on IBM i.

So How Is Zend Server Different for IBM i?

The IBM i is a different sort of beast compared to a Linux or Windows server. For this reason, there are some omissions in the version of Zend Server for IBM i:

 

  • Clustering—Clustering is not supported on IBM i. This decision was made because IBM i shops scale vertically. Clustering is meant to allow Intel-based solutions to scale horizontally.
  • Server Replicating—Again, since IBM i shops scale vertically, this feature is unnecessary.
  • Download Server—Most IBM i applications are transaction-based. There is little need for downloads.

 

Personally, I agree with the logic in excluding these functions from the IBM i implementation of Zend Server, with the possible exception of the last one. While I can think of several situations where having a download server would be useful if not completely necessary, I agree with the statement that most IBM i applications are transactional in nature, so there is very limited need for a download server.

Get Started!

So now that you are all chomping at the bit to start using Zend Server, I've saved the best for last. As of April 12, 2010, Zend Server 5 for IBM i is no longer in beta and is generally available. You can now go to the Zend Web site and download the general release version of Zend Server 5 for IBM i. There are several download files and options for installing it. Read the release notes carefully and note that you will need to uninstall any installed beta version before installing the general release version. The general release version includes a Windows installer if you want to go that route. If not, the install is still very simple, using FTP and save files (*SAVF). Enjoy!

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: