How to prevent Easycom from loading

Several clients have asked me how to prevent their older Easycom components from loading, now that they’ve migrated from the Easycom toolkit to the new open source IBM i Zend toolkit.

Here are instructions based on suggestions from Rod Flohr of Zend Support. These tips have worked for me on Zend Server 5.6 for IBM i and will probably work on older releases as well.

Prevent Easycom extension from being loaded by PHP

1. Go to the Zend Server administration interface in your browser: http://yourIBMi:10088/ZendServer/.

2. Navigate to the Server Setup -> Extensions tab.

3. Find Easycom on the list of extensions. If the extension is On, click the “Turn off” link on the same line to turn it off.

4. You should see this message: “The extension ‘Easycom’ will be turned off after restarting your PHP”. You don’t need to restart PHP now if you plan to do so later, at the end of “Prevent I5_COMD daemon…” (below).

5. Also look for an extension called ‘pdo_easycom,’ which you may see if you had downloaded or purchased the Easycom product directly from the vendor. If it is there, turn it off as well.

Prevent I5_COMD daemon from starting in ZENDSVR

If you see a job named I5_COMD running in the ZENDSVR subsystem, but no longer use the Easycom toolkit, you may wish to follow these steps:

STEP 1: Rename the startup program that launches I5_COMD. From a 5250 command line:

RNMOBJ OBJ(ZENDSVR/ZCCSTREACD) OBJTYPE(*PGM) NEWOBJ(ZCCSTREACX)

This renaming will “hide” I5_COMD’s startup program from Zend Server’s startup procedure. (Don’t worry—the “missing object” message is monitored—no errors.)

STEP 2: Stop and start Zend Server from the menu. From a 5250 command line:

GO ZENDSVR/ZSVMENU

Use option “2. Stop Zend Server Subsystem”

Verify that subsystem ZENDSVR has ended and that there are no jobs named ZENDSVR in the QHTTPSVR subsystem.

Next, use option “1. Start Zend Server Subsystem.”

Verify that subsystem QHTTPSVR is running and contains the usual ZENDSVR jobs. Verify that subsystem ZENDSVR is started, but without I5_COMD inside.

Posted in IBM i, iSeries, PHP, System i, Web development, Zend Server, Zend's PHP toolkit for IBM i | 3 Comments

Using procedures and service programs with the PHP Toolkit for IBM i

The open source PHP Toolkit enables PHP applications to call procedures (functions) that are defined within RPG service programs on IBM i. (For more information on the toolkit, see my toolkit information page.)

Here’s an example that will work with PHP Toolkit API version 1.4.0 or higher. I also included some ‘boilerplate’ to show best practices for connecting to the toolkit and checking for a successful connection. The illustration of how to call a procedure is in the second half.

<?php
require_once('ToolkitService.php');

// connect to toolkit using DB2 credentials (can also leave blank for default authority)
try {
    $conn = ToolkitService::getInstance('*LOCAL', 'MYUSER', 'MYPASS');
} catch (Exception $e) {
    // Determine reason for failure.
    // Probably database authentication error or invalid or unreachable database.
    $code = $e->getCode();
    $msg = $e->getMessage();

    switch ($code) {
        case 8001:
            // "Authorization failure on distributed database connection attempt"
            // Usually means a wrong DB2 user or password
            echo 'Could not connect due to wrong user or password.';
            break;
        case 42705:
            echo 'Database not found. Try WRKRDBDIRE to check.';
            break; 
        default:
            echo 'Could not connect. Error: ' . $code . ' ' . $msg;
            break;
    } //(switch)
    die; // couldn't connect...handle this however you wish     
} //(try/catch)

// set stateless mode for easy testing (no 'InternalKey' needed).
// (setOptions() introduced in v1.4.0)
$conn->setOptions(array('stateless'=>true));

/* If you wish to test this script but you don't have a real service program,
 * use parseOnly and parseDebugLevel as shown below.
 * No program will be called and you'll get your original values back.
 * Simply uncomment the next line to try this great testing feature of the toolkit.
*/
//$conn->setOptions(array('parseOnly'=>true, 'parseDebugLevel'=>1));

// define several input/output params
$params[] = $conn->AddParameterChar('in', 1,'Division', 'DIV', 'A');
$params[] = $conn->AddParameterChar('in', 6,'Product', 'PROD', '123456');
$params[] = $conn->AddParameterPackDec('both', 7, 2, 'Quantity', 'QTY', '4.53');
$params[] = $conn->AddParameterZoned('out', 5, 2, 'Price', 'PRICE', '0');

// define a procedure return param. Can be any type, even a data structure
$retParam = $conn->AddParameterInt32('out', '4-byte int', 'MYRESULT', '13579');

/* Call service program procedure. 
 * In this example, assume your program is MYLIB/MYPGM and has a procedure/function 'myproc'
 * (procedure name is case-sensitive).
 * Note: specify optional procedure name in parameter 5, an array with associative index 'func'.
*/
$result = $conn->PgmCall('MYPGM', 'MYLIB', $params, $retParam, array('func'=>'myproc'));

if (!$result) {
    echo 'Error calling program. Code: ' . $conn->getErrorCode() . ' Msg: ' . $conn->getErrorMsg();
}

echo 'Called program successfully.<BR><BR>';
echo 'Input/output params: QTY: ' . $result['io_param']['QTY'] . ' PRICE: ' . $result['io_param']['PRICE'] . '<BR>'; 
echo 'Procedure return param MYRESULT: ' . $result['retvals']['MYRESULT']; 

/* 
The above will output something like:

Called program successfully.

Input/output params: QTY: 4.53 PRICE: 0.00
Procedure return param MYRESULT: 13579

*/
Posted in IBM i, iSeries, PHP, System i, Zend Server, Zend's PHP toolkit for IBM i | 1 Comment

ZF2 and DB2 for IBM i

I’d like to address questions about DB2 support in Zend Framework 2.x. Because I helped create the IBM i-friendly DB2 adapter for Zend Framework 1.x, I’ve followed the development of a similar adapter for ZF2.

(updated January 30, 2013, upon the release of ZF 2.1)

Q. Does ZF 2 include an adapter for DB2?
A. Yes! Starting with ZF 2.1, which was released today.

Q. Is Alan’s IBM i-friendly DB2 adapter for Zend Framework 1.x needed in 2.x?
A. No. Because ZF’s Zend_Db equivalent in 2.x works differently than in 1.x, my 1.x component is not needed in 2.x.

Q. Does ZF 2.1′s DB2 adapter work with IBM i?
A. Yes! Please try it and provide feedback to the ZF team.

Posted in db2, IBM i, iSeries, Open Source, PHP, System i, Zend Framework | Tagged , , , , , , , , , , | 11 Comments

Alan Seiden Consulting LLC

I’ve started a consulting firm dedicated to helping companies attain superior results with PHP, Zend Framework, IBM i, and related technologies such as Zend Server, DB2, and the new PHP toolkit.

We will provide guidance and best practices, training, mentoring, troubleshooting, performance help, team building, speaking, writing, and advocacy.

My first speaking engagement with my new company will be the OCEAN conference on July 20, 2012, in Southern California. Hope to see some of you there.

Thanks for your support. I will be available starting July 2 after a short vacation. I look forward to working with you.

Alan

Posted in Announcements, db2, IBM i, PHP, Zend Framework, Zend Server, Zend's PHP toolkit for IBM i | 4 Comments

Which version of Zend Server for IBM i do I have?

Here is the easiest way to determine which version of Zend Server is installed on a given IBM i system.

From a 5250 command line, follow these four steps:

1. GO LICPGM
2. Take option 10 (Display installed licensed programs)
3. Scroll down to the licensed program 2ZSVRPI 
     (on my system it's the last entry)
4. Read the product description,
     containing version numbers for Zend Server and PHP
     in the form "Zend Server for IBM i [version] ( PHP [version])"

On my IBM i, I see:
2ZSVRPI   *INSTALLED   Zend Server for IBM i 5.6.0 ( PHP 5.3 )
so Zend Server is at 5.6.0 and PHP is 5.3.

Thanks to Zend’s Sam Pinkhasov for this tip.

Posted in IBM i, iSeries, PHP, System i, Web development, Zend Server, Zend's PHP toolkit for IBM i | Tagged , , , | 2 Comments

Toolkit webcast tomorrow, April 5

Tomorrow I’m presenting a new webcast, New PHP Toolkit from Zend and IBM: Open Source on IBM i, as part of System i Network’s free “Virtual Conference.”

Date: Thursday, April 5
Time: 11:15am ET
Registration (free): http://tinyurl.com/new-toolkit-20120405

Other presentations in the virtual conference include Jon Paris explaining why PHP is an excellent strategic choice on IBM i, two talks on mobile technology, and more.

I invite you to watch the webcast, ask questions, and learn more about the new toolkit.

Posted in Announcements, Apache, db2, Events, IBM i, iSeries, PHP, System i, Web development, Zend Framework, Zend Server, Zend's PHP toolkit for IBM i | Leave a comment

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.”

Posted in Announcements, Apache, db2, IBM i, iSeries, Performance, PHP, System i, Web development, Zend Framework, Zend Server | 3 Comments

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

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

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.

Posted in Announcements, IBM i, iSeries, PHP, System i | Tagged | 1 Comment

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

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