Scanning…
Goto Main Page
Goto PHP page
Goto Documents
This download includes PHP new Zend Toolkit and PHP original toolkit compatibility layer (CW), you may develop applications for either interface from your laptop or on your IBM i web server using the support DB2 stored procedure interface to XMLSERVICE (iAccess odbc, DB2 connect).
XMLSERVICE library installed on IBM i machine. Zend Server installation includes a version of XMLSERVICE library, and provides periodic PTFs to Zend Server product, therefore you need only download a new version if you are having an specific XMLSERVICE issue.
Zend Server 5 settings toolkit.ini: XMLServiceLib = "ZENDSVR" debugLogFile = "/usr/local/zendsvr/share/ToolkitApi/debug.log" logfile = "/usr/local/zendsvr/share/ToolkitApi/toolkit.log" ToolkitServiceSet.php: define('XMLSERVICELIB', 'ZENDSVR'); define('ZSTOOLKITLIB', 'ZENDSVR'); Zend Server 6 settings toolkit.ini: XMLServiceLib = "ZENDSVR6" debugLogFile = "/usr/local/zendsvr6/var/log/debug.log" logfile = "/usr/local/zendsvr6/var/log/toolkit.log" ToolkitServiceSet.php: define('XMLSERVICELIB', 'ZENDSVR6'); define('ZSTOOLKITLIB', 'ZENDSVR6');
conf/httpd.conf DefaultFsCCSID 37 CGIJobCCSID 37
conf/fastcgi.conf setSetEnv="CCSID=1208"; SetEnv="LANG=C"
toolkit.ini [system] v5r4=true --or-- $conn->setToolkitServiceParams(array('v5r4'=>true));
Instructions after download and unzip
Note: - CCSID 65535 machines read FAQ - develop on your laptop? copy PHP /ToolkitApi directory to your laptop and use a DB2 connection to XMLSERVICE (iAccess odbc, DB2 connect) As noted in the readme file: If you are using the CW, and used i5_program_call(), i5_userspace_get(), or i5_command() from inside a function, and you get output variables from them, please add the line: if (function_exists('i5_output')) extract(i5_output()); after the i5_ call. This will make the variables available to your script. (See the readme file for details.)
See readme file for information on toolkit.ini setings.
Test/verify used by cwtest script with PHP CW.
Versions
2011–11–18 - cwdemo-library-1.1.1.zip
Note: CCSID 65535 machines read FAQ
Versions
2012–12–04 - xmlservice-php-tests-1.7.5.zip
2012–10–17 - xmlservice-php-tests-1.7.3.zip
2012–09–17 - xmlservice-php-tests-1.7.2.zip
2012–08–15 - xmlservice-php-tests-1.7.0.zip
2012–02–29 - xmlservice-php-tests-1.6.6.zip
2011–10–24 - xmlservice-php-tests-1.5.8.zip
> cd /home/myplace > unzip xmlservice-php-tests-n.n.n.zip > edit authorization.php (see notes)
call qp2term > export PATH=/usr/local/zendsvr/bin:$PATH > export LIBPATH=/usr/local/zendsvr/lib > cd /home/myplace > pear run-tests *.phpt
Note: -- CCSID 65535 machines read FAQ -- phpt tests use XMLSERVICE library (main RPG download) call crttest ... works V5+ call crttest6 ... these tests only work V6+ -- authorization.php - profiles used $user = 'DB2'; <--- main test profile $pass = 'xxxxx'; $adoptuser1 = 'TKITU1'; <--- switch profile $adoptpass1 = 'xxxxx'; - odbc, ibm_db2, pdo_ibm must be enabled php.ini and conf.d/ (or will skip) - pcntl must be enabled php.ini and conf.d/ (or pcntl_fork not work few tests) - GET/POST test require installed XMLCGI interface Apache (or will skip) $i5rest = "http://mymachine/cgi-bin/xmlcgi.pgm"; -- some tests may have hard coded profile/data/paths (trying to fix over time) -- pear tests replace ibm_db2.ini for ibm_db2.i5_ignore_userid=1 tests -- make a copy config.d/ibm_db2.ini -- suppose to return to normal last kill test (test_99988_MISC_db2_set_immed_kill.phpt) -- Yips machine note: - if you delete all spool file one of demos is look for spool data for QTMHHTTP ... to fix ... SBMJOB CMD(QSH CMD('/QOpenSys/usr/bin/sh -c "/QOpenSys/usr/bin/ps -ef | grep qtm" 2>&1')) USER(QTMHHTTP) SBMJOB CMD(QSH CMD('/QOpenSys/usr/bin/sh -c "/QOpenSys/usr/bin/system wrkactjob" 2>&1')) USER(QTMHHTTP)
Experimental PECL extension allows XMLSERVICE to run in PHP-CGI job or state full second job (ipc).
Versions:
2013–08–23 - ibm_i-1.0.2.GA.zip
See README zip file (dependency xmlservice 1.8.0+)
Add new ini file etc/conf.d/ibmi.ini
extension=ibm_i.so ibm_i.pgm_name="XMLSERVICE/XMLSTOREDP" ibm_i.func_name="RUNASCII" ibm_i.profile_reset=true
string i_xmlservice(string xmlin [, string ctl, string ipc, long pase_ccsid, long ebcdic_ccsid]) mandatory: 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)
$toolkitConn->setOptions(array('customControl'=>'*debug'))
Other debug options …
Job1 (threaded) Job 2 Job 3 (DB2 userid/password) Job 4 (optional XTOOLKIT job) (ctl=*debugcgi) (ctl=*debugproc) (ctl=*debug) browser -> Apache ->XMLCGI (Apache CGI child) -> QSQSRVR (XMLSERVICE *here) -> QSQSRVR (XMLSERVICE client) -> XTOOLKIT (XMLSERVICE ipc=/tmp/flinstone) $ctl .= " *debugcgi"; // Job 2 - debug XMLCGI to see REST/HTTP data passed by client (when using REST only) $ctl .= " *debugproc"; // Job 3 - debug XMLSERVICE "client" to see DB2 passed data (DB2 interface) $ctl .= " *debug"; // Job 4 - debug XMLSERVICE "server" to see XMLSERVICE calls (DB2 interface) // Note: when ctl='*here', both XMLSERVICE "client"/"server" // are in QSQSRVSR job (NO XTOOLKIT job) // remote: Attaching with LUW drivers changes QSQSRVR ... // CLIENT (Client Access drivers) <==> QZDAxxxx // CLIENT (DB2 Connect drivers) <==> QRWxxxx