Seiden Group
Modern Development & Open Source for IBM i
  • Link to LinkedIn
  • Link to Mail
  • Home
  • Seiden PHP+
    • Seiden PHP+
    • Install & Learn
    • SmartSupport
    • PHP Migrations & Upgrades
    • Success Stories
    • Free PHP Assessment
    • Documentation
    • What’s New (Changelog)
  • IBM i Services
    • Development
    • Training & Mentoring
    • Open Source Setup & Upgrades
    • SSL/TLS Install & Learn
    • Performance
  • Support
    • Open Source & PHP
    • VS Code for i
    • Developer Support
    • Support Success Stories
  • VS Code for i
    • Support
    • Training
    • Code for i Resource Guide
    • Getting Started Videos
    • Code for IBM i Fridays
  • Free Stuff
    • IBM i Strategy & Tips
    • PHP Upgrade Assessment
    • CNX Valence Assessment
    • VS Code for IBM i Resources
    • Code for IBM i Fridays
    • QCachegrind Download
    • PHP Toolkit for IBM i Resources
    • Qshell on i Library
  • Blog
  • About
    • About Our Team
    • About Alan Seiden
    • Speakers & Sessions
    • In the News
  • Contact
  • 201.447.2437
  • Search
  • Menu Menu

Tag Archive for: IBMi

Alan Seiden

Video promo for WMCPA IBM i conference: March 10-12, 2015

February 22, 2015/0 Comments/in News & Events /by Alan Seiden

Join me and 20 other speakers at the Wisconsin Midrange Computer Professional Association (WMCPA) spring technical conference, March 10-12, 2015, at the Lake Lawn Resort on the shores of Delavan Lake.

Speakers: Aaron Bartell, Rob Bestgen, Larry Bolhuis, Tom Cremieux, Floyd Del Muro, Raymond Everhart, Margaret Fenlon, Susan Gantner, Charles Guarino, Scott Klement, Chris Koppe, Jon Paris, Mike Pavlak, Jim Ritchhart, Debbie Saugen, Alan Seiden, Dr. Frank Soltis, Robert Swanson, Robin Tatam, Jeff Tickner, Steve Will

Details: http://wmcpa.org/index.php/conference-2015/ibmi-conference-2015

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2015-02-22 19:20:212015-02-27 21:35:40Video promo for WMCPA IBM i conference: March 10-12, 2015
Alan Seiden

Overcome SSH ‘Permission denied’ for long IBM i user profiles

February 6, 2015/4 Comments/in IBM i, PHP /by Alan Seiden

[UPDATED May 2023]

In IBM i releases before 7.4, IBM i’s Secure Shell (SSH) rejected connection attempts with user profile names longer than eight (8) characters. The error message can vary, but may be similar to “Permission denied, please try again” or “Failed to connect sshd.”

For those older releases (7.3 and earlier), you can allow user profiles longer than 8 characters by editing the file:
/QOpenSys/QIBM/UserData/SC1/OpenSSH/etc/sshd_config
and adding a new line containing the string:
ibmpaseforienv PASE_USRGRP_LIMITED=N

To apply your changes, end and then start the SSH server, like so:

1
2
ENDTCPSVR SERVER(*SSHD)
STRTCPSVR SERVER(*SSHD)

An alternative is to set the variable system-wide, to allow other PASE processes to use the improvement:

1
ADDENVVAR ENVVAR(PASE_USRGRP_LIMITED) VALUE('N') LEVEL(*SYS)

For more details about configuring SSH, see How to Configure and Use SSH on IBM i.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2015-02-06 23:59:412025-12-12 12:23:00Overcome SSH ‘Permission denied’ for long IBM i user profiles
Alan Seiden

Save your fingers when using PHP-CLI

September 12, 2014/1 Comment/in IBM i, PHP /by Alan Seiden

2021 Update

The instructions in this blog post contain outdated paths and file names.

To learn the modern way to “save your fingers”—plus additional tips for setting up PHP on IBM i—refer to these two articles in our Open Source Documentation library.

  • How to Call PHP from CL or RPG
    With the Seiden CommunityPlus+ PHP binary, which is php, not php-cli.
  • How to Set the PATH to Open Source Packages on IBM i
    After you set the path, you can use php myscript.php

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:

1
/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:

1
2
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:

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

1
phpc -v

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

1
2
3
4
5
6
7
8
9
10
11
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.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2014-09-12 03:57:112023-04-26 12:58:18Save your fingers when using PHP-CLI
Alan Seiden

Zendcon 2014 promo video for IBM i users

August 21, 2014/0 Comments/in Db2 for i, IBM i, PHP /by Alan Seiden

About Zendcon:

  • Premier PHP conference
  • Oct. 27-30, 2014, Santa Clara, California
  • Dedicated IBM i track
  • Special day of IBM i workshop tutorials (Oct. 27; choose “conference/tutorials” when you register.)
  • More information: http://zendcon.com or https://www.seidengroup.com/2014/08/12/zendcontutorial-discount-expires-aug-15/ (discount extended to Aug 31)
https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2014-08-21 14:46:482014-08-21 14:46:48Zendcon 2014 promo video for IBM i users
Alan Seiden

Find the Technology Refresh (TR) level of an IBM i

August 16, 2014/9 Comments/in Db2 for i, IBM i /by Alan Seiden

Between major IBM i releases, IBM ships frequent enhancements using the Technology Refresh (TR). Particular features are present with specific TR levels. SQL offers an easy way to identify the latest TR level on an IBM i system.

IBM i services comprise a collection of DB2 and SQL objects that provide a wealth of system information. The GROUP_PTF_INFO view will display an IBM i’s TR level to the user who runs this SQL:

1
2
3
4
5
SELECT CURRENT SERVER CONCAT ' is running ' CONCAT PTF_GROUP_TARGET_RELEASE
CONCAT ' with TR level: ' CONCAT PTF_GROUP_LEVEL AS TR_LEVEL
FROM QSYS2.GROUP_PTF_INFO WHERE PTF_GROUP_DESCRIPTION = 'TECHNOLOGY REFRESH'
AND PTF_GROUP_STATUS = 'INSTALLED' ORDER BY PTF_GROUP_TARGET_RELEASE, PTF_GROUP_LEVEL DESC
LIMIT 1;

When run on my server, the result was a single column, TR_LEVEL, with the value:

1
SEIDENI is running V7R2M0 with TR level: 3

Time for me to upgrade, yes?

Here is my original post with older techniques:

I recently needed to know if a client’s IBM i 7.1 system had Technology Refresh 4 (TR4). If it did, I could use the relatively new INSERT with remote SUBSELECT technique, which allows a single SQL statement to copy DB2 data from one partition to another. Such are the benefits of keeping current with Technology Refreshes.

After reading an article on TRs by Steve Will, I decided to document how to determine which TRs are installed on an IBM i system.

TRs, which were introduced with IBM i 7.1, are packaged as Program Temporary Fixes (PTFs). They can be found with the DSPPTF command.

First, determine the product number of the licensed internal code of  your system. For 7.1, the product number is 5770999.

Then use the DSPPTF command followed by this product number. For example:

1
DSPPTF 5770999

When run on my test system, this command produced a list of PTFs that included MF99007, MF99006, MF99005, MF99004, MF99003, MF99002, and MF99001.

Because Technology Refresh PTF numbers follow the format MF99nnn, where nnn is the TR number (bolded above), I knew that TR7, TR6, TR5, TR4, TR3, TR2, and TR1 were available. I was pleased to learn I could use TR4’s enhancements to DB2.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2014-08-16 15:56:082022-10-16 17:31:37Find the Technology Refresh (TR) level of an IBM i
Alan Seiden

ZendCon+Tutorial discount expires Aug. 31

August 12, 2014/1 Comment/in Db2 for i, IBM i, PHP /by Alan Seiden

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.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2014-08-12 07:33:402014-08-21 10:17:16ZendCon+Tutorial discount expires Aug. 31
Alan Seiden

IBM i safe from OpenSSL Heartbleed bug

April 10, 2014/4 Comments/in IBM i /by Alan Seiden

Clients have asked me whether their IBM i servers may be vulnerable to hackers due to the widely publicized OpenSSL Heartbleed bug.

The answer is no. IBM i is safe from this bug, which is present only in specific OpenSSL versions: 1.0.1 through 1.0.1f (inclusive). IBM i’s latest version of OpenSSL, shipped with the “Portable Utilities for i” licensed program product 5733SC1, is 0.9.8, which does not contain the bug.

To make doubly certain, check what version of OpenSSL is installed on your IBM i. Run these two commands, which, respectively, start a PASE interactive terminal session and check the openssl version:
call qp2term
openssl version

For me, the above commands returned “OpenSSL 0.9.8m 25 Feb 2010,” confirming that I’m not affected.

Press F3 afterward to leave the PASE environment.

Thanks to Jim Oberholtzer of Agile Technology Architects for his contribution to this answer.

UPDATE from IBM: System SSL and IBMJSSE2 are also safe from the vulnerability on IBM i.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2014-04-10 16:16:572014-04-16 23:46:57IBM i safe from OpenSSL Heartbleed bug
Alan Seiden

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

December 27, 2012/14 Comments/in IBM i, PHP /by Alan Seiden

Calling procedures in RPG service programs, including getting the return value, is a powerful feature of the PHP Toolkit. The sample script below demonstrates how it’s done.

Note: Make sure your procedure name is 100% correct. It is case-sensitive. If you get an error, run the following command (replacing LIBNAME/PGMNAME with your library and program names) and look for your procedure name in the output. The command:
DSPSRVPGM SRVPGM(LIBNAME/PGMNAME) DETAIL(*PROCEXP)

The example below includes ‘boilerplate’ code 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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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 = []; // start with empty array
$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
 
*/

For more information on the toolkit, see our toolkit information page or get in touch.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2012-12-27 15:19:322023-05-17 17:24:29Calling procedures and service programs with the PHP Toolkit for IBM i
Alan Seiden

ZF2 and DB2 for IBM i

October 16, 2012/11 Comments/in Db2 for i, IBM i, Open Source, PHP /by Alan Seiden

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.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2012-10-16 10:38:442021-11-19 14:20:28ZF2 and DB2 for IBM i
Alan Seiden

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

April 18, 2012/3 Comments/in IBM i, PHP, Web development /by Alan Seiden

UPDATE: As of 2020, we recommend using Seiden PHP on IBM i and LINUX for reliability, speed, and ease of maintenance.


Updated December 20, 2017

Here is the easiest way to learn the version of Zend Server installed on an IBM i system.

From a 5250 command line, follow these four steps:

1
2
3
4
5
6
7
1. GO LICPGM
2. Take option 10 (Display installed licensed programs)
3. Scroll down to the licensed program 2ZSVRPI, 6ZSVRPI, or 7PHPZND
     (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:
7PHPZND   *INSTALLED   Zend Server for IBM i 9.1.2 ( PHP 7.1 )
so Zend Server is at 9.1.2 and PHP is 7.1.

Thanks to Zend’s Sam Pinkhasov for this tip.

https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2012-04-18 03:44:482024-10-29 18:14:11Which version of Zend Server for IBM i do I have?
Page 11 of 12«‹9101112›
SUBSCRIBE
Open Thinking
Monthly IBM i Strategy & Tips
  • This field is for validation purposes and should be left unchanged.

IBM i Development

  • RPG, COBOL, SQL, Node,
    PHP, Python, Valance, etc.
  • Modernization. Integration.
  • Web and API Solutions
  • Legacy Maintenance
    ...
LET'S GET IT DONE!

Recent Posts

  • Do You Need IBM i Observability?
  • PHP 8.6 is Coming Soon to IBM i
  • Safer npm installation is on the way for Node.js (and all JavaScript)
  • Access Modern Security for IBM i and Connected Web Environments
  • IBM i: A Natural Platform for Agentic AI
  • PHP on IBM i in 2026: The Modernization Engine
  • Your “AS/400” Is a Modern IBM i Platform
  • MCP + AI for IBM i Teams (with a MongoDB example)
  • GnuPG PHP Extension for IBM i: Now Included with Seiden Support
  • Getting Started with Code for IBM i: A Lunch & Learn Video

SEIDEN GROUP: Modern Development & Open Source for IBM i

Home   |   Seiden PHP+   |   IBM i Services  |   Support   |   VS Code for i   |   Free Stuff   |   Blog  |   Privacy Policy  |   Contact         201.447.2437

© 2026 Seiden Group, LLC
  • Link to LinkedIn
  • Link to Mail
Scroll to top Scroll to top Scroll to top