From YiPs Wiki (i powered)


(click to open)

Quick Page Table of Contents


DB2 Connect access only …

Goto Main Page
Goto Documents

Who is this page for?

Instructions designed for IBM i developer learning PHP starting from ground zero …


On IBM i …

On laptop …

1) Install PHP on your PC/laptop

Download Zend Server …

Download PHP toolkit and CW …
{Goto Main Page} and {Download Latest} version of PHP framework. This zip file contains all the PHP code required to use the new toolkit from your laptop (your DB2 Connect).

Follow the instructions below to install the php code (Linux, but Windows similar) …

cd /usr/local/zend/share
sudo unzip
sudo mkdir ToolkitApi
sudo mv ToolkitApi/.
sudo unzip
sudo gedit php.ini &
; UNIX: "/path1:/path2"
include_path = ".:/usr/local/zend/share/ToolkitApi:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear"
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"

Note: If you are using the IBM i PTFS for XMLSERVICE change toolkit.ini: XMLServiceLib = “QXMLSERV”. Also check the lugconnect PHP script and change XMLSERVICE library to QXMLSERV as needed.

Run ibm_db2 to IBM i

Need some tests to try (a few include with XMLSERVICE) …

> call crttest

Let’s try a test …

In this case we will NOT be using the PHP toolkit from Zend, but use just XML across the PHP ibm_db2 connection. After you have used XMLSERVICE for awhile you will realize that there are many ways to contact IBM i and get work done (including no script at all like the LUG/ZendCon demo).

On your laptop create these files for testing via Zend Studio (or Apache, or command line)..

Run new PHP Toolkit to IBM i

Step 1) Follow install PHP toolkit instructions above

Step 2) Let’s try a test using PHP Toolkit …

In this case we WILL be using the PHP toolkit from Zend from your laptop … nice thing to remember is all works the same when you move it up to your production IBM i and/or you switch drivers from ibm_db2 to odbc (f-l-e-x-i-b-l-e).

Retrieved from
Page last modified on February 14, 2013, at 12:08 PM EST