PHP

Goto Main Page
Goto Documents

XMLSERVICE

XMLSERVICE continues working with the Zend team to bring Zend Server to IBM i. If you are interested in IBM i Zend Server see this link for additional information {http://www.zend.com/en/products/server}.

This page is mostly for developers of PHP toolkit

We use this page to hold new and experimental copies of the php toolkit, ibm_db2, pdo_ibm, etc. You may use any information you find here, but the official php toolkit documentation is stored at Zend Server links.

PHP easy to follow samples

Sample code common tasks PHP ibm_db2 and PHP toolkit.

  • {quick.zip} - PHP samples
    • db2.php - PHP db2.php includes multiple ibm_db2 create table, create keys, prepare/execute, exec, call stored procedures, blobs (and web display blob image), etc.
    • toolkit.php - PHP toolkit.php include many examples simple *PGM, *SRVPGM, *CMD, PASE, but also includes complex data structures and complex system API calls.

PHP Toolkit download latest

  • {PHP Toolkit.zip} - PHP Toolkit (client)
    • {Installation} - How to install/config/debug?
      • {Changelog} - What’s New?
      • {Next Testing} - Unreleased versions?
      • {Source} - Source code
      • Alan Seiden <alan@alanseiden.com> - Author

New direct call XMLSERVICE (no DB2 connect, no REST)

  • Attach:ibm_itool-1.0.1.zip - PHP ibm_itool - direct call IBM i XMLSERVICE (test pecl code)
    string i_xmlservice(string xmlin [, string ctl, string ipc, long pase_ccsid, long ebcdic_ccsid])  
      xmlin - XML input
      optional: ctl - xmlservice control words ("*sbmjob *here *cdata ...")
      optional: ipc - private connection ipc/internalKey route to XTOOLKIT job ("/tmp/packers")
      optional: pase_ccsid - cssid for ascii-2-ebcdic conversion (input conversion)
      optional: ebcdic_ccsid - cssid for ebcdic-2-ascii conversion (output conversion)
    
    • Note: not been added to PHP Toolkit yet (talk with Alan)

online helper tool

PHP ibm_db2 new features (test only)

Please use modules pecl.

  • pecl ibm_db2 2.0.2(+)
  • {Changelog} - What’s New?
  • test only versions
    • Versions with test binary (Zend Server 6 and 9 - php56 and php7.1.2)
      ibm_db2–2.0.2-zs1 - (Alan - ibm_db2.ini i5_char_trim=1 - trim spaces from char results)
      2017–12–21 - {ibm_db2-2.0.2-zs1-full-src.zip} - PHP ibm_db2 full source
      2017–12–21 - {ibm_db2-2.0.2-zs1-php7.1.2.zip} - PHP7 ibm_db2.so
      2017–12–21 - {ibm_db2-2.0.2-zs1-php56.zip} - PHP56 ibm_db2.so
    • Versions with test binary (special php 7 only)
      • Yips db2sock - download binaries for test (experimental)
      • only works with db2sock libdb400.a (https://bitbucket.org/litmis/db2sock)
        ibm_db2–2.0.2-db2sock3 - (db2_toolkit_json new db2sock libdb400.a json toolkit)
        2018–01–16 (17:37) - {ibm_db2-2.0.2-db2sock3-full-src.zip} - PHP ibm_db2 full source
        2018–01–16 (17:37) - {ibm_db2-2.0.2-db2sock3-php7.1.2.zip} - PHP7 ibm_db2.so
        -- sync (normal) --
        <?php
        require_once('connection.inc');
        $jsonin = '{"pgm":[{"name":"HELLOSRV", "lib":"DB2JSON", "func":"HELLO"},
                {"s":{"name":"char", "type":"128a", "value":"Hi there"}}
               ]}';
        $conn1 = db2_connect($database, $user, $password);
        $jsonout = db2_toolkit_json( $conn1, $jsonin);
        var_dump($jsonout);
        ?>
        
        -- or async (new) --
        
        <?php
        require_once('connection.inc');
        $jsonin = '{"pgm":[{"name":"HELLOSRV", "lib":"DB2JSON", "func":"HELLO"},
                {"s":{"name":"char", "type":"128a", "value":"Hi there"}}
               ]}';
        $conn1 = db2_connect($database, $user, $password);
        echo getmypid() . " about to call db2_toolkit_json_async ...\n";
        $stmt = db2_toolkit_json_async( $conn1, $jsonin );
        do {
          echo getmypid() . " read paper, walk dog, get rss feeds, play stock market\n";
        } while (!db2_toolkit_ready( $stmt ));
        $jsonout = db2_toolkit_json_reap( $stmt );
        var_dump($jsonout);
        ?>
        
    • Additional module required libgcc_s.a (any ibm_db2.so test binary)
      libgcc_s.a
      2016–09–08 - {ibm_db2-libgcc.zip} - PHP added library libgcc_s.a (binary)
      2016–09–08 - Install libgcc_s.a module in /usr/local/zendsvr6/lib or /usr/local/zendphp7/lib
      2016–09–08 - Why? many of ibm_db2.so are built with gcc on my test systems and need this runtime module.

PHP pdo_ibm new features (test only)

  • Additional module required libgcc_s.a (same as latest ibm_db2)
    • {ibm_db2-libgcc.zip} - PHP added library libgcc_s.a (binary - 2016–09–08)
    • Install libgcc_s.a module in /usr/local/zendsvr6/lib or /usr/local/zendphp7/lib
      • Why? many of pdo_ibm.so are built with gcc on my test systems and need this runtime module.
  • Zend Server 9 - PHP pdo_ibm-1.3.4-sg(n) test fix (binary php 5.6 and php 7.1.2 — install correct version)
    • {PDO_IBM-1.3.4-sg4-full-src.zip} - PHP pdo_ibm full source (1.3.4-sg4 source - 2017–06–14)
    • {pdo_ibm-1.3.4-sg4-php7.1.2.zip} - PHP pdo_ibm.so (1.3.4-sg4 binary - php 7.1.2)
    • {pdo_ibm-1.3.4-sg4-php56.zip} - PHP pdo_ibm.so (1.3.4-sg4 binary - php 5.6)
      • Zend Server 9 PHP 7.1.2 (cli) (built: Feb 22 2017 16:06:40) ( NTS )
      • Zend Server 6 PHP 5.6.10 (cli) (built: Jul 12 2015 16:05:00)
      • Any test version binary is for these levels and may not load with higher versions (see php.log).
  • Zend Server 6 (very old)
  • doc

Remote db2 connect product from your laptop to IBM i via DRDA (old doc)

Most IBM i connect attributes work remote via DB2 Connect V10.5 (with DB2 for i features):
DB2 Connect V10.5 is a licensed program product that needs to be purchased. For production usage, the DB2 Connect Unlimited Edition for System i packaging typically offers the best terms for IBM i customers. Contact your local IBM representative or business partner for pricing information. For more information on this product, see the following Web site: http://www-03.ibm.com/software/products/en/db2connunlieditforsysti. A trial DB2 Connect license file for evaluation purposes can be obtained by sending an email to: rmahendr@us.ibm.com. See ibm_db2 connect keywords at http://www.php.net/manual/en/function.db2-connect.php .

PHP XMLSERVICE Toolkit Zend Manuals

PHP XMLSERVICE Raw XML interfaces (only DB2 or REST, not toolkit)

Zend Server PHP Toolkit Archive (client)

  • Additional module required libgcc_s.a
    • {ibm_db2-libgcc.zip} - PHP added library libgcc_s.a (binary - 2016–09–08)
    • Install libgcc_s.a module in /usr/local/zendsvr6/lib or /usr/local/zendphp7/lib
      • Why? many of ibm_db2.so are built with gcc on my test systems and need this runtime module.
  • Zend Server 9 - PHP ibm_db2 1.9.9-zs(n) test fix (binary php 5.6 and php 7.1.2 — install correct version)
    • {ibm_db2-1.9.9-zsb-full-src.zip} - PHP ibm_db2 full source (1.9.9-zsb source - 2017–10–13)
    • {ibm_db2-1.9.9-zsb-php7.1.2.zip} - PHP ibm_db2.so (1.9.9-zsb binary - php 7.1.2)
    • {ibm_db2-1.9.9-zsa-php56.zip} - PHP ibm_db2.so (1.9.9-zsb binary - php 5.6)
      • Zend Server 9 PHP 7.1.2 (cli) (built: Feb 22 2017 16:06:40) ( NTS )
      • Zend Server 6 PHP 5.6.10 (cli) (built: Jul 12 2015 16:05:00)
      • Any test version binary is for these levels and may not load with higher versions (see php.log).
  • Zend Server 6 (old) - PHP ibm_db2 1.9.7-zs(n) test fix (binary php 5.6 — install correct version)
    • {ibm_db2-1.9.7-zs6.4-full-src.zip} - PHP ibm_db2 full source (1.9.7-zs6.4 source - 2017–10–03)
    • {ibm_db2-1.9.7-zs6.4-php56.zip} - PHP ibm_db2.so (1.9.7-zs6.4 binary - php 5.6)
      • PHP 5.6.10 (cli) (built: Jul 12 2015 16:05:00)
      • no longer testing php 5.5
      • Any test version binary is for these levels and may not load with higher versions (see php.log).
  • doc
    • {Installation} - How to install/config/debug?
      • {Changelog} - What’s New?
      • {Attribute List} - new ibm_db2.ini attributes and program overrides
      • {Compile} - How to compile?
      • Tony Cairns <adc@us.ibm.com> - Author

Versions:
2014–11–04 - 1.5.1.zip
2013–03–19 - cw-tk-php-1.5.0.zip
2012–12–17 - cw-tk-php-1.4.0.zip
2012–10–11 - cw-tk-php-1.3.3.zip
2012–10–02 - cw-tk-php-1.3.2.zip
2012–08–16 - cw-tk-php-1.3.1.zip
2012–07–23 - cw-tk-php-1.3.0.zip
2012–06–18 - cw-tk-php-1.2.6.zip
2012–05–04 - cw-tk-php-1.2.5.zip
2012–03–15 - cw-tk-php-1.2.4.zip
2012–02–17 - cw-php-1.2.3.zip
2012–02–15 - cw-php-1.2.2.zip
2012–02–14 - cw-php-1.2.1.zip
2012–02–08 - cw-php-1.2.0.zip
2012–01–13 - cw-php-1.1.8.zip
2011–12–28 - cw-php-1.1.7.zip
2011–12–26 - cw-php-1.1.6.zip
2011–12–14 - cw-php-1.1.5.zip
2011–11–28 - cw-php-1.1.4.zip
2011–11–21 - cw-php-1.1.3.zip
2011–11–17 - cw-php-1.1.2.zip
2011–11–16 - cw-php-1.1.1.zip

Zend Server PHP ibm_db2 Archive

Versions with test binary (Zend Server 6 and 9 - php56 and php7.1.2)
ibm_db2–2.0.1-zs2 - (PHPDave leak php toolkit via ibm_db2 stored procedure in/out param)
2017–11–13 - {ibm_db2-2.0.1-zs2-full-src.zip} - PHP ibm_db2 full source
2017–11–13 - {ibm_db2-2.0.1-zs2-php7.1.2.zip} - PHP7 ibm_db2.so
2017–11–13 - {ibm_db2-2.0.1-zs2-zsb-php56.zip} - PHP56 ibm_db2.so ibm_db2–2.0.1-zs1 - (Stewart request executing flag to abandon persistent connection RPG programs called resulting MSGW)
2017–11–09 - {ibm_db2-2.0.1-zs1-full-src.zip} - PHP ibm_db2 full source
2017–11–09 - {ibm_db2-2.0.1-zs1-php7.1.2.zip} - PHP7 ibm_db2.so
2017–11–09 - {ibm_db2-2.0.1-zs1-zsb-php56.zip} - PHP56 ibm_db2.so 2017–10–13 - ibm_db2–1.9.9-zsb
2017–10–13 - {ibm_db2-1.9.9-zsb-full-src.zip} - PHP ibm_db2 full source (1.9.9-zsb source - 2017–10–13)
2017–10–13 - {ibm_db2-1.9.9-zsb-php7.1.2.zip} - PHP ibm_db2.so (1.9.9-zsb binary - php 7.1.2)
2017–10–13 - {ibm_db2-1.9.9-zsb-php56.zip} - PHP ibm_db2.so (1.9.9-zsb binary - php 5.6)
2017–09–19 - ibm_db2–1.9.9-zs9
2017–09–19 - {ibm_db2-1.9.9-zs9-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs9 source - 2017–09–19)
2017–09–19 - {ibm_db2-1.9.9-zs9-php7.1.2.zip} - PHP ibm_db2.so (1.9.9-zs9 binary - php 7.1.2)
2017–09–19 - {ibm_db2-1.9.9-zs9-php56.zip} - PHP ibm_db2.so (1.9.9-zs9 binary - php 5.6)
2017–09–15 - ibm_db2–1.9.9-zs8
2017–09–15 - {ibm_db2-1.9.9-zs8-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs8 source - 2017–09–15)
2017–09–15 - {ibm_db2-1.9.9-zs8-php7.1.2.zip} - PHP ibm_db2.so (1.9.9-zs8 binary - php 7.1.2)
2017–09–15 - {ibm_db2-1.9.9-zs8-php56.zip} - PHP ibm_db2.so (1.9.9-zs8 binary - php 5.6)
2017–09–12 - ibm_db2–1.9.9-zs7
2017–09–12 - {ibm_db2-1.9.9-zs7-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs7 source - 2017–09–12)
2017–09–12 - {ibm_db2-1.9.9-zs7-php7.1.2.zip} - PHP ibm_db2.so (1.9.9-zs7 binary - php 7.1.2)
2017–09–12 - {ibm_db2-1.9.9-zs7-php56.zip} - PHP ibm_db2.so (1.9.9-zs7 binary - php 5.6)
2017–03–22 - ibm_db2–1.9.9-zs6
2017–03–22 - {ibm_db2-1.9.9-zs6-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs6 source - 2017–03–22)
2017–03–22 - {ibm_db2-1.9.9-zs6-php7.1.2.zip} - PHP ibm_db2.so (1.9.9-zs6 binary - php7.1.2)
2017–03–22 - {ibm_db2-1.9.9-zs6-php56.zip} - PHP ibm_db2.so (1.9.9-zs6 binary - php 5.6)

Versions with test binary (Zend Server 6 and 9 - php56 and php 7.0.8)
2017–03–17 - ibm_db2–1.9.9-zs6
2017–03–17 - {ibm_db2-1.9.9-zs6-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs6 source - 2017–03–17)
2017–03–17 - {ibm_db2-1.9.9-zs6-php7.zip} - PHP ibm_db2.so (1.9.9-zs6 binary - php 7.0.8)
2017–03–17 - {ibm_db2-1.9.9-zs6-php56.zip} - PHP ibm_db2.so (1.9.9-zs6 binary - php 5.6)
2017–01–05 - ibm_db2–1.9.9-zs5
2017–01–05 - {ibm_db2-1.9.9-zs5-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs5 source - 2017–01–05)
2017–01–05 - {ibm_db2-1.9.9-zs5-php7.zip} - PHP ibm_db2.so (1.9.9-zs5 binary - php 7.0.8)
2017–01–05 - {ibm_db2-1.9.9-zs5-php56.zip} - PHP ibm_db2.so (1.9.9-zs5 binary - php 5.6)
2016–12–14 - ibm_db2–1.9.9-zs4
2016–12–14 - {ibm_db2-1.9.9-zs4-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs4 source - 2016–12–14)
2016–12–14 - {ibm_db2-1.9.9-zs4-php7.zip} - PHP ibm_db2.so (1.9.9-zs4 binary - php 7.0.8)
2016–12–14 - {ibm_db2-1.9.9-zs4-php56.zip} - PHP ibm_db2.so (1.9.9-zs4 binary - php 5.6)
2016–11–28 - ibm_db2–1.9.9-zs3
2016–11–28 - {ibm_db2-1.9.9-zs3-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs3 source - 2016–11–28)
2016–11–28 - {ibm_db2-1.9.9-zs3-php7.zip} - PHP ibm_db2.so (1.9.9-zs3 binary - php 7.0.8)
2016–11–28 - {ibm_db2-1.9.9-zs3-php56.zip} - PHP ibm_db2.so (1.9.9-zs3 binary - php 5.6)
2016–09–27 - ibm_db2–1.9.9-zs2
2016–09–27 - {ibm_db2-1.9.9-zs2-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs2 source - 2016–09–27)
2016–09–27 - {ibm_db2-1.9.9-zs2-test-change.zip} - pecl test change via Sam (included full source also)
2016–09–27 - {ibm_db2-1.9.9-zs2-php7.zip} - PHP ibm_db2.so (1.9.9-zs2 binary - php 7.0.8)
2016–09–27 - {ibm_db2-1.9.9-zs2-php56.zip} - PHP ibm_db2.so (1.9.9-zs2 binary - php 5.6)
2016–08–31 - ibm_db2–1.9.9-zs1
2016–08–31 - {ibm_db2-1.9.9-zs1-full-src.zip} - PHP ibm_db2 full source (1.9.9-zs1 source - 2016–08–31)
2016–08–31 - {ibm_db2-1.9.9-zs1-php7.zip} - PHP ibm_db2.so (1.9.9-zs1 binary - php 7.0.8)
2016–08–31 - {ibm_db2-1.9.9-zs1-php56.zip} - PHP ibm_db2.so (1.9.9-zs1 binary - php 5.6)

Versions with test binary (Zend Server 6 - php56)
2016–08–25 - ibm_db2–1.9.7-zs6.4
2016–08–25 - {ibm_db2-1.9.7-zs6.4-full-src.zip} - PHP ibm_db2 full source (1.9.7-zs6.4 source - 2017–10–03)
2016–08–25 - {ibm_db2-1.9.7-zs6.4-php56.zip} - PHP ibm_db2.so (1.9.7-zs6.4 binary - php 5.6)
2016–08–25 - ibm_db2–1.9.7-zs6.3
2016–08–25 - {ibm_db2-1.9.7-zs6.3-full-src.zip} - PHP ibm_db2 full source (1.9.7-zs6.3 source - 2016–08–25)
2016–08–25 - {ibm_db2-1.9.7-zs6.3-php56.zip} - PHP ibm_db2.so (1.9.7-zs6.3 binary - php 5.6)
2016–07–25 - ibm_db2–1.9.7-zs6.2
2016–07–25 - {ibm_db2-1.9.7-zs6.2-full-src.zip} - PHP ibm_db2 full source (1.9.7-zs6.2 source - 2016–07–25)
2016–07–25 - {ibm_db2-1.9.7-zs6.2-php56.zip} - PHP ibm_db2.so (1.9.7-zs6.2 binary - php 5.6)
2016–03–15 - ibm_db2–1.9.7-zs6.1
2016–03–15 - {ibm_db2-1.9.7-zs6.1-full-src.zip} - PHP ibm_db2 full source (1.9.7-zs6.1 source - 2016–03–15)
2016–03–15 - {ibm_db2-1.9.7-zs6.1-php55.zip} - PHP ibm_db2.so (1.9.7-zs6.1 binary - php 5.5)
2016–03–15 - {ibm_db2-1.9.7-zs6.1-php56.zip} - PHP ibm_db2.so (1.9.7-zs6.1 binary - php 5.6)

Versions:
2015–05–18 - ibm_db2-1.9.7-sg5.zip
2015–02–24 - ibm_db2-1.9.7-sg4.zip
2015–02–23 - ibm_db2-1.9.7-sg2.zip
2015–02–20 - ibm_db2-1.9.7-sg1.zip
2014–06–05 - ibm_db2-1.9.6-sg25.zip
2014–06–04 - ibm_db2-1.9.6-sg24.zip
2014–06–03 - ibm_db2-1.9.6-sg23.zip
2014–06–02 - ibm_db2-1.9.6-sg22.zip
2014–05–29 - ibm_db2-1.9.6-sg21.zip
2014–05–27 - ibm_db2-1.9.6-sg19.zip
2014–03–21 - ibm_db2-1.9.6-sg15.zip
2014–02–18 - ibm_db2-1.9.6-sg14.zip
2014–02–12 - ibm_db2-1.9.6-sg13.zip
2014–01–22 - ibm_db2-1.9.6-sg12.zip

Older binaries (Alan)

Zend Server PHP pdo_ibm Archive

Versions:
2014–11–14 - PDO_IBM-1.3.3-sg3.zip
2014–11–04 - PDO_IBM-1.3.3-sg2.zip
2014–10–31 - PDO_IBM-1.3.3-sg1.zip

Older binaries (Alan)

PHP regression tests

Versions:
2016–12–13 - php-xmlservice-pecl-tests-1.9.7.zip
2014–07–28 - php-xmlservice-pecl-tests-1.8.5.zip
2014–07–24 - php-xmlservice-pecl-tests-1.8.4.zip

Author(s)

Tony “Ranger” Cairns - IBM i PHP / PASE