DB 2 Documents

PHP DB2 Interfaces

This page is a quick anchor point of reference for commonly used PHP DB2 configurations. The examples are intended to start you from your laptop PHP “kick the tires” and lead you to production PHP running on your IBM i. Examples will focus on three primary PHP interfaces to DB2.

  1. PHP ibm_db2 - IBM supported procedural interface
  2. PHP odbc - Community supported ODBC procedural interface (subset)
  3. PHP pdo_ibm - IBM supported Object Oriented interface

CCSID issues

Have CCSID issues? Junk characters? Nothing works?

  • IBM i actions, see CCSID

PHP DB2 topical information

Running PHP to DB2 (remote client)

Examples

  • lugsample.zip - download multiple simple examples presented to IBM i LUG
  • PHP ibm_db2 password - Very simple ibm_db2 web site example (full) with PHP sessions encrypted password sign-on/sign-off (no RPG)
  • PHP ibm_db2 lob - PHP easy trick for BLOB data on the web
  • [[PHPAndRPG | PHP and RPG] - Demo PHP font-ended 5250 RPG, plus REST/SOAP server, more …

Author(s)

Tony “Ranger” Cairns - IBM i PHP / PASE