Resources for Upgrading to PHP 7 on IBM i

PHP 7 Zend ServerNow that speedy PHP 7 is available for IBM i, we’re helping our clients upgrade to this long-awaited release via Zend Server 9. I thought I’d share some of our favorite resources for performing this upgrade safely and efficiently.

First, we recommend Rod Flohr’s article Migrate to Zend Server 9 from Previous Versions, which contains both basic instructions and special tips.

Read more

PHP 7 and Free Basic Zend Server Edition for IBM i

PHP 7 is creating excitement among PHP aficionados for its speed and additional language techniques.

As the official runtime for enterprise PHP, Zend Server has always offered a free basic edition to IBM i customers.

Recently, a change occurred on the Zend Server download page that has caused some confusion. At the time of this writing, the Zend Server download was labeled as a “30-day trial” even though, as an IBM i customer, you are still entitled to a free basic edition license. Of course, you can also opt for paid editions.

IBM i users can request a download of Zend Server for  IBM i and PHP 7 here, confident that they will obtain a legitimate license, not a trial license. Fill out the form and you’ll be sent a download link. You’ll then be able to choose between the free basic license and value-add paid licenses.

Zend Server for IBM i support knowledge base

The support team at Zend has written a knowledge base of tips for configuring and administering Zend Server for IBM i.  The tips, written chiefly by Rod Flohr, are accurate and thorough. Recommended is the site’s option to notify registered users when new articles are posted. URL: https://support.zend.com/hc/en-us/sections/200554323-Zend-Server-for-IBM-i

Collaboration at COMMON

The 2015 COMMON annual meeting and expo, now in its first day, is helping speakers and attendees create innovation through IBM i integration: open source, closed source, IBM and vendor solutions. For example, of my six presentations during this conference, two are collaborations:

The Art of Performance Diagnostics, with IBM’s Dawn May, allows us to show, among other topics, how IBM i’s integrated performance tools complement green-screen tools and third-party tools (in this case, Zend Server) to pinpoint and solve performance issues (here, PHP-and DB2-based applications).

PHP Tricks for RPG Developers, a talk jointly created by RPG and SQL expert Birgitta Hauser and me, combines RPG, PHP, and DB2, allowing RPG to achieve graphical (charts and graphs, PDF and Excel files) and internet (json-based web services, flexible email) functionality using native functions.

Conferences such as COMMON serve a need that’s difficult to replicate back at the office—brainstorming and sharing possibilities among interdisciplinary peers, or sitting side-by-side with like-minded colleagues who work for different employers, to try something new. This week, for example, some of us plan to share knowledge on compiling binaries in PASE and to further the potential of open source on IBM i. I’m looking forward to presenting my talks (both joint and solo) and helping to realize new ideas with forward-looking colleagues during the conference.

Birgitta Hauser and Alan Seiden collaborate on their talk at COMMON 2015

Birgitta Hauser and Alan Seiden collaborate on their talk at COMMON 2015

January newsletter

I’ve relaunched my PHP and IBM i newsletter. Here is the January 2015 edition, out today.

To subscribe and receive this free newsletter each month, go here: alanseiden.com/tips.

Comments welcome. Happy 2015–

Alan

Learn to combine RPG+PHP at Toronto user group, Jan. 21, 2015

I’ve recorded a special message about my upcoming presentations at the Toronto Users Group for Power Systems evening meeting on January 21, 2015:

In the video, I discuss the two sessions I’ll be presenting:

  • Bring RPG/COBOL business logic to the web with the PHP Toolkit
  • PHP Tricks for RPG Developers

Hope you can make it to the Toronto meeting, Jan. 21, 2015, Markham, Ontario. Details: http://tug.ca

Free PHP still exists on IBM i (Zend Server Basic Edition)

I’ve been hearing from people confused about Zend Server editions on IBM i. Yes,  Community Edition was removed with Zend Server 7/8, but Zend replaced that with the no-charge “Basic” edition. The Basic edition exists only on IBM i. It requires registration but at no cost. Zend Server for IBM i can be downloaded here.

While I often recommend the Professional or Enterprise editions of Zend Server for the value-added tools (Z-Ray being the newest and most exciting, but also Zend Job Queue, Zend Monitor, and more) and for Zend’s professional support, rest assured that free PHP still exists, with the Basic edition.

For more information, here is the current list of Zend Server editions for IBM i.

Save your fingers when using PHP-CLI

In Batch PHP I showed how to call PHP from a command line. For example, with Zend Server 6 or 7 on IBM i, one would launch a PASE command line using the command CALL QP2TERM, or launch QShell using QSH, then type a command such as this:

/usr/local/zendsvr6/bin/php-cli myscript.php

For those of us who use PHP-CLI often, the above command can be a finger-buster. Let’s shorten the path by creating a symbolic link:

cd /usr/bin
ln -s /usr/local/zendsvr6/bin/php-cli phpc

I created the symbolic link in /usr/bin, a directory that is likely to be in any user’s path.

Now try the shortened command:

phpc myscript.php

To test the shortcut without a PHP script, use the -v switch, which requests version information (‘v’ for version) about your PHP installation.

phpc -v

The above command will return version information that starts out something like this:

PHP 5.3.6 (cli) (built: Apr  7 2011 09:37:14)                                
Copyright (c) 1997-2011 The PHP Group                                        
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies                
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Techno
logies                                                                       
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologie
s [loaded] [licensed] [disabled]                                             
    - with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technolog
ies [loaded] [licensed] [enabled]                                            
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies
 [loaded] [not licensed] [disabled]

By creating a symbolic link to the PHP-CLI binary, practitioners of PHP can speed their work while saving their fingers.

For more about symbolic links, see my article Link up with QShell.

Zendcon 2014 promo video for IBM i users

About Zendcon:

ZendCon+Tutorial discount expires Aug. 31

ZendCon, the premier PHP conference, October 27-30, 2014, in Santa Clara, California, has a discount expiring August 15 31 (extended!). When you register, be sure to include the tutorial day (Oct. 27). If you already registered but forgot to add the tutorial day, you can contact the organizers via a link at the bottom of the registration page. Among other half-day tutorials, I’ll be presenting two focused on IBM i:

  • PHP Performance on IBM i
    • If you’re interested in performance of PHP, or IBM i generally, in order to scale your application up to meet increased user demand, or if you have specific performance needs right now, you’ll want to attend.
    • Additional insight to be provided by IBM’er Tony Cairns (see below)
    • Testimonial from last year: “Our process now runs 30-50% faster, thanks to one tip from Alan’s presentation.”
      —Mike Meszaros, Software Developer, Specialty Pipe & Tube
  • DB2 with PHP in Depth
    • DB2 on IBM i has received major enhancements over the past year, including a dozen new settings in the PHP ibm_db2 middleware. Hear  how they can help improve security, performance, and stability. Other topics will include, but not be limited to:
      • Basic topics (with added commentary to make it interesting for everyone) such as library lists, prepared queries for security, persistent connections
      • DB2 in frameworks
        • Zend Framework 2
          • Including pagination (page-at-a-time logic)
        • Status of PDO and how it can be used in Laravel and other frameworks
      • The real scoop about modernization and the DDS vs. DDL (SQL) debate
      • Connecting to IBM i’s DB2 from Windows and Linux and other IBM i partitions
      • How to link MySQL-based applications (WordPress, etc.) to DB2 with the DB2 Storage Engine, with special tips
      • Using DB2’s HTTP features to make PHP-based web services even more accessible, including to allow RPG to call PHP and get results back
      • How to optimize queries
      • Strategies to safely open your application to the public
      • Topics and questions that YOU request (contact me in advance if you wish)

My co-presenter for tutorials will be IBM’s Tony Cairns, who helped bring PHP to the IBM i in the first place. He also created XMLSERVICE (toolkit back-end) and is a maintainer of ibm_db2 on the IBM i. One reason Tony comes to ZendCon is to hear from attendees such as yourselves. Normally he stays locked up in his lab. Take advantage of this opportunity to meet him. Watch Tony and me argue and debate in front of the class!

I’m also presenting a session during the regular conference about the PHP Toolkit for IBM i. I’ve updated my presentation with new features of the toolkit and best practices for calling RPG and COBOL.

ZendCon‘s topics are generally advanced ones to enable professional, enterprise-ready development practices. There’s also an IBM i track and plenty of networking time so that IBM i users of PHP can learn from speakers and each other, making the conference appropriate for intermediate users of PHP on IBM i as well.

Hope to see you there, October 27-30, 2014! Remember to register for tutorial day when you register for the conference. Get in touch with questions you’d like answered during my presentations.