Get rid of annoying message from Easycom

General discussion on Zend Server for IBM System i
Post Reply
lkleinman
Posts: 9
Joined: Wed Jan 26, 2011 8:00 pm

Get rid of annoying message from Easycom

Post by lkleinman » Thu Nov 07, 2013 4:25 pm

We recently moved from a 5.4 system to a 7.1 system and just reinstalled Zend Server for I CE. Everything is fine except that we keep getting "EasyCOM for PHP for IBM i: Unregistered copy." showing up in QSYSOPR. The message has a URL to register it, but the site has nothing on it about registration. Anybody have this happen to them?

kent_zacharias
Posts: 22
Joined: Mon May 09, 2011 8:05 pm

Re: Get rid of annoying message from Easycom

Post by kent_zacharias » Fri Nov 08, 2013 3:45 pm

Perhaps the following link will help solve the issue.

http://www.alanseiden.com/2013/02/18/ho ... m-loading/

zend_i5
Posts: 158
Joined: Mon Mar 23, 2009 5:22 pm

Re: Get rid of annoying message from Easycom

Post by zend_i5 » Tue Nov 26, 2013 8:50 am

lkleinman wrote:We recently moved from a 5.4 system to a 7.1 system and just reinstalled Zend Server for I CE. Everything is fine except that we keep getting "EasyCOM for PHP for IBM i: Unregistered copy." showing up in QSYSOPR. The message has a URL to register it, but the site has nothing on it about registration. Anybody have this happen to them?
You would have to purchase a support license from Easycom Toolkit vendor in order to prevent messages in QSYSOPR. Another choice is to use XMLSERVICE Toolkit (http://youngiprofessionals.com/wiki/XMLSERVICE) which is bundled with Zend Server.

chrisbirk
Posts: 10
Joined: Fri Oct 12, 2012 11:03 pm

Re: Get rid of annoying message from Easycom

Post by chrisbirk » Sat Dec 28, 2013 11:16 pm

It depends what all you are doing whether you need easycomm or not. If you are doing advanced stuff then you need to take a look at purchasing it or useing xmlservice. If you are simply doing queries with like i5_connect and such, then you might want to do what I did, and simply go and modify the code to use the db2_ functions and be done with it. (if you don't call the i5_ functions in easycomm you won't get messages).

This is what I did, let me try to share from memory the changes I made. I got a copy of ultraedit (www.ultraedit.com), mapped the folder on the i, did all the changes real fast. The below is my best recollection. I had ONE job that called a i5/os procedure to run, and that was simply replaced with me inserting a record into a dummy database that had a trigger on it, and the trigger called the procedure. We had quite a bit of code and in time flat we had it all changed over.

i5_query( $sql) becomes db2_exec($conn, $sql)
i5_errno becomes db2_stmt_errno
i5_errmsg bcomes db2_stmt_errmsg

On your connects you need to set the naming convention and change from an ip to *LOCAL and
of course change i5_connect to db2_connect (since you should be calling your connects with a
require/include and not throughout your code, should be easy to change.

sample connect:
$options = array('i5_naming' => DB2_I5_NAMING_ON );
$conn = db2_pconnect("*LOCAL","user","password", $options );
if (! $conn) {
echo db2_conn_errno();
echo "<br>";
echo db2_conn_errormsg();
die();}

If you have like $values =i5_fetch_row($query), I5_NEXT_RECORD), that can become
$values = db2_fetch_array($query)

A few other things as I remember (and so you might want to test a bit as it has been over a year
since I did these changes).

i5_fetch_row returned an array you accessed via an index (i.e. [0],[1],[2]). i5_fetch_arry returned
an array that you access via column name (i.e ['NAME']

In db2, db2_fetch_row points to a row but only returns a boolean. db2_fetch_array returns an
array you access via an index (i.e. [2]). db2_fetch_assoc returns an array that you access via
column name ['PRICE']. So basically:

i5_fetch_row becomes db2_fetch_array
i5_fetch_array becomes db2_fetch_assoc

You could use db2_fetch_both which allows you to access either way but uses more resources.

Post Reply