Archive

Posts Tagged ‘IBMi’

Alan Seiden Consulting: PHP and IBM i Expertise › Video promo for WMCPA IBM i conference: March 10-12, 2015

February 22nd, 2015 Comments off

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 on 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


Read the original at Alan Seiden Consulting: PHP and IBM i Expertise.

Pete's Wordshop › Stumbling startup with node.js on IBM i

February 5th, 2015 Comments off

My 7.2 upgrade was done specifically to get going with an “officially” supported version of node.js.  Installing 5733OPS is a no brainer (either RSTLICPGM or just using the option to install a licensed program in the LICPGM menu will work).  Node worked great.  Already creating much mayhem with socket.io, express.js, and a bunch of other stuff I will eventually break.  The problem I had is that I could only do this stuff when I was in the Node/bin folder.  Otherwise I would see:

node -v
exec(): 0509-036 Cannot load program node because of the following errors:
0509-150   Dependent module libstdc++.a(libstdc++.so.6) could not be loaded.
0509-022 Cannot load module libstdc++.a(libstdc++.so.6).
0509-026 System error: A file or directory in the path name does not exist.

What?   I am only a noob when it comes to *NIX environments and I know there are a bunch of moving parts that need to be correctly aligned.  I thought my PATH was the only thing I needed to look at but I was missing something essential: The LIBPATH environment variable.  Many executables share functionality so the “helper” objects need to be in the PATH as well so they can be found (like service programs or DLL’s) so the LIBPATH needs to be set as well.  My “Brogrammer” in the Open Source space, Aaron Bartell, turned me on to that fact and he proposes a couple of solutions.  You could just manually set the PATH and LIBPATH:

[Depending on the shell you use you can either do it in one step like this]

export PATH=/QOpenSys/QIBM/ProdData/Node/bin:$PATH
export LIBPATH=/QOpenSys/QIBM/ProdData/Node/bin:$LIBPATH

[or your shell may require that you do it in two steps like this]

PATH=/QOpenSys/QIBM/ProdData/Node/bin:$PATH
export PATH
LIBPATH=/QOpenSys/QIBM/ProdData/Node/bin:$LIBPATH
export LIBPATH

Or you could create a script and just run it when needed.  Here are some screen shots that show the problem and solutions:

node_error

So the problem occurs in #1 above even though I have the node/bin folder on my path (#2).  If I check the LIBPATH environment variable, it is empty so I append the path to the shared library to the LIBPATH (which just happens to be the same as the node/bin folder).  Adding the path and exporting it makes it available to my environment so now when I run node – v I get the version listed rather than an error.  Nice!  Aaron pointed me here to find this info and recommended that I post questions here so that others might benefit.  Agreed!  But I’ll probably also post here since I tend to forget where I posted solutions to my issues.

The script to do this is simple as well.  You should have a folder in your IBM i “home” folder under your IBM i user name.  Mine would be /home/PETE/  You could either use this command on IBM i:

EDTF ‘node_env.sh’   (you can call the script whatever you want) :

edtf_node_env

If you want to up your *NIX geek cred, you could use vi in SSH (or call qp2term):

vi /home/PETE/node_env.sh

vi_node_env

However you get there!  Then when you are in the console you can just execute the script:

node_script_fix

So, all is well.  Just remember to execute the node_env.sh script, OR, if you are going to launch a node server instance using CL, I usually create a script and then just execute the script in the CL program so you don’t have to have multiple entries to set the environment.  Just do your heavy lifting in the script, let your CL do the easy part.

So, that’s it!  There is probably more detail here than most folks need but for folks who are new to open source on IBM i, a little extra instruction can fill in a lot of blanks.

 


Read the original at Pete's Wordshop.

Alan Seiden Consulting: PHP and IBM i Expertise › Zend Framework 2 performance optimization: it works

September 26th, 2014 Comments off

Zend Framework 2 (ZF2) provides optimization techniques that are often overlooked by published performance tests. One excellent source for such techniques is a presentation by Gary Hockin. I was thrilled when my client and friend King Harrison IV of K3S began testing the effect of these techniques on his ZF2 application running on IBM i.

King’s initial tests produced a 600ms reduction in load time, obtaining respectable performance for his database-heavy application. He plans to update his blog post with further speed improvements as he implements them.

Read King Harrison IV’s blog post about ZF2 performance improvements.


Read the original at Alan Seiden Consulting: PHP and IBM i Expertise.

Alan Seiden Consulting: PHP and IBM i Expertise › Save your fingers when using PHP-CLI

September 12th, 2014 Comments off

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.


Read the original at Alan Seiden Consulting: PHP and IBM i Expertise.

Young i Perspectives › Why IBMi – Research Effort

August 31st, 2012 Comments off
I am putting together a form of research initiative that aims to quantify *why* a non-IBMi tech person should consider or pursue IBMi.  I believe one of the best sources of this information can come from the community, so I’ve setup a GoogleDoc that can be edited by anybody (no Google signup required).
If you are interested in contributing then please head over to this link:http://bit.ly/OyCd3M
The results of this will be placed onto IBM’s IBMi wiki page for all to see and act as a place we can point people.
Here’s a tweet phrase if you are looking to share socially:
Why #IBMi? If you had to convince a #Ruby #PHP #Java dev to run their app on #IBMi what would you say? Comment here: bit.ly/OyCd3M
AaronBartell.com


Read the original at Young i Perspectives.

Categories: Blogs Tags: , , , , ,
css.php