LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-13-2015, 08:23 PM   #1
denniswilliams
LQ Newbie
 
Registered: Nov 2015
Posts: 1

Rep: Reputation: Disabled
IBM/DB2 access via PHP


General questions to start...

Have a requirement to access a remote DB2 database on a AS/400 (an iSeries) system. Also, this is all done through an established VPN connection.

I seem to have the appropriate DB2 driver setup with PHP, at least it reports that it is anyway.

Seems that all my research tells me to use PHP ODBC libraries to achieve this, which leads to my main issue -- getting an odbc connection access established.

I have IBM's i Access software installed, and I get this info currently from /etc/odbcinst.ini...


[iSeries Access ODBC Driver 64-bit]
Description=iSeries Access for Linux 64-bit ODBC Driver
Driver=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading=2
DontDLClose=1
UsageCount=1

[iSeries Access ODBC Driver]
Description=iSeries Access for Linux ODBC Driver
Driver=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Driver64=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup64=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading=2
DontDLClose=1
UsageCount=1


And...even if any of that is correct, I'm not sure of a proper way to build-out a DSN string for PHP's odbc_connect() functions.

Whenever I check Apache log's for errors, I only get that the connection object (what I check for errors) says that it's an invalid connection object.

Any help/guidance/suggestions would be greatly appreciated.
 
Old 11-22-2015, 12:42 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by denniswilliams View Post
General questions to start...
Have a requirement to access a remote DB2 database on a AS/400 (an iSeries) system. Also, this is all done through an established VPN connection. I seem to have the appropriate DB2 driver setup with PHP, at least it reports that it is anyway.

Seems that all my research tells me to use PHP ODBC libraries to achieve this, which leads to my main issue -- getting an odbc connection access established. I have IBM's i Access software installed, and I get this info currently from /etc/odbcinst.ini...

[iSeries Access ODBC Driver 64-bit]
Description=iSeries Access for Linux 64-bit ODBC Driver
Driver=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading=2
DontDLClose=1
UsageCount=1

[iSeries Access ODBC Driver]
Description=iSeries Access for Linux ODBC Driver
Driver=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Driver64=/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup64=/opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading=2
DontDLClose=1
UsageCount=1


And...even if any of that is correct, I'm not sure of a proper way to build-out a DSN string for PHP's odbc_connect() functions. Whenever I check Apache log's for errors, I only get that the connection object (what I check for errors) says that it's an invalid connection object. Any help/guidance/suggestions would be greatly appreciated.
You shouldn't need anything special from IBM...in my experience, IBM's software tends to be overly complicated. PHP already has DB2 functionality, which is probably already in the CentOS repositories. Installation instructions are:
http://php.net/manual/en/ibm-db2.installation.php
http://codehole.blogspot.com/2010/02...on-centos.html

..examples:
http://www.ibm.com/developerworks/da...614_scott.html
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IBM DB2 sql troubles Reegz Programming 0 12-14-2006 01:54 AM
SuSE 9.2 and IBM DB2 V.8.1 rkarl SUSE / openSUSE 4 01-05-2005 03:18 AM
RH 7.2 - PHP 4.3.4 and IBM DB2 V8.1 jkpalmer52 Linux - Newbie 2 11-07-2003 12:13 PM
IBM DB2 Problen Bogdan Linux - General 1 10-16-2003 03:30 AM
IBM DB2 with Kerberos fenriswolf Linux - Security 0 10-11-2001 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration