(click to open)

Quick Page Table of Contents


ODBC client access only …

Goto Main Page

Who is this page for?

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

  • … installing PHP on a laptop
  • … little control over IBM i machine (can’t install Zend Server on IBM i)
  • … but have a Client Access ODBC connection to IBM i (good enough)


On IBM i …

  • recent IBM i {DB2 PTFs} or clobs will fail (PHP ODBC drivers)

On laptop …

Check your odbc configuration

Walk before we run … check if client access ODBC is working from command line.

Q: How do I test my odbc connection?
A: use odbc tool isql
>isql myibmi MYID MYPASSWORD

If isql is working there is a good chance that PHP odbc will be working.

$conn = odbc_connect("myibmi","MYUID","MYPWD");

odbc configuration (if you need help)

If you need iAccess drivers DBC instructions {Linux ODBC}.

odbc running on IBM i

Most IBM i configurations will already have ODBC running for various other iAccess products, but if you need STRHOSTSVR SERVER(*DATABASE) is the command to start the ODBC IBM i server.

Run to IBM i

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


Tony “Ranger” Cairns - IBM i PHP / PASE