Scanning…
Instructions designed for IBM i developer learning PHP starting from ground zero …
On IBM i …
XMLSERVICE 1.7.5 (see toolkit.ini setting for QXMLSERV below): - PTF '5770DG1 V7R1M0 SI48830' - PTF '5761DG1 V6R1M0 SI48831' - PTF '5722DG1 V5R4M0 SI48440' - change toolkit.ini: XMLServiceLib = "QXMLSERV"
On laptop …
Download Zend Server …
Download PHP toolkit and CW …
{Goto Main Page} and {Download Latest} version of cw-php-x.x.x.zip 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 cw-php-1.1.2.zip sudo mkdir ToolkitApi sudo mv ToolkitApi.zip ToolkitApi/. sudo unzip ToolkitApi.zip 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.
Need some tests to try (a few include with XMLSERVICE) …
5250 > ADDLIBLE XMLSERVICE > CRTCLPGM PGM(XMLSERVICE/CRTTEST) SRCFILE(XMLSERVICE/QCLSRC) > 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)..
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).