Re: Using DB2 from PHP

2010-10-11 Thread Donald Russell
I'll check out those links... Thanks for the pointers. On Sat, Oct 9, 2010 at 01:59, Joachim Schmidt < joachim.schm...@oberquembach.de> wrote: > hi, > > I've missed, that DB2 is on a different machine. How to get the > ODBC-driver see > " > http://publib.boulder.ibm.com/infocenter/db2luw/v9/ind

Re: Using DB2 from PHP

2010-10-09 Thread Joachim Schmidt
hi, I've missed, that DB2 is on a different machine. How to get the ODBC-driver see "http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.cli.doc/doc/t0023867.htm";. How to install PDO_ODBC (ibm-db2) have a look at "http://www.phpbuilder.com/manual/ref.pdo-odb

Re: Using DB2 from PHP

2010-10-08 Thread Donald Russell
I did install php-odbc... because calls to odbc_connect failed with an error like "call to nonexistent function" When I tried your sample code, after a few syntax corrections, I got this error: Connection to database failed.SQLSTATE[IM002] SQLConnect: 0 [unixODBC][Driver Manager]Data source name n

Re: Using DB2 from PHP

2010-10-08 Thread Joachim Schmidt
hi, have you checked, e.g. with phpinfo() , wether PDO (odbc) and PDO Driver for ODBC (ibm-db2) is enabled? if it is, try this: ... ... $database= "your-DB"; $username="your_dbuser"; $password="your_DB2pw"; try { $dsn="odbc:$database"; $conn = new PDO($dsn, $username, $password);

Using DB2 from PHP

2010-10-07 Thread Donald Russell
I'm running RHEL 5.5 on zVM and DB2 running on a different host system (also zLinux, but that doesn't matter) >From the first system, I want to access DB2 using PHP. (Not via Apache, I'm using PHP for some scripting) Seems straightforward enough but I need the IBM Data Server Driver for ODBC a