473,802 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get stock Mandrake 9.2 PHP to connect

I can't get PHP to connect to DB2 on the same server.

I'm running both Apache/PHP and DB2 on Mandrake Linux 9.2. I didn't compile
PHP; just installed what appear to be the appropriate RPMs (I don't like to
compile/install and ruin RPM dependencies; I've seen the documents which say to
build PHP "--with-ibm-db2=/home/db2inst1/sqllib"):

unixODBC-2.2.6-4mdk
libunixODBC2-2.2.6-4mdk
php-mysql-4.3.2-3mdk
libphp_common43 2-4.3.3-2mdk
php-ini-4.3.3-1mdk
php-xml-4.3.2-3mdk
php-cli-4.3.3-2mdk
unixODBC-gui-gtk-2.2.6-4mdk
php-cgi-4.3.3-2mdk
php-xmlrpc-4.3.2-3mdk
php-pgsql-4.3.2-5mdk
php-imap-4.3.2-3mdk
php-unixODBC-4.3.3-1mdk
unixODBC-gui-qt-2.2.6-4mdk
php-pear-4.3.2-3mdk
php-ldap-4.3.2-3mdk
apache2-mod_php-2.0.47_4.3.2-2mdk
php-xslt-4.3.2-3mdk
libgtkodbcconfi g0-2.2.6-4mdk

I can't find a Mandrake RPM for php-db2 nor php-ibm-db2.

I've found documentation at:

http://www-1.ibm.com/support/docview...&cc=US&lang=en
http://www-1.ibm.com/support/docview...&cc=US&lang=en
http://publib.boulder.ibm.com/infoce...d/t0006349.htm
http://www.unixodbc.org/odbcinst.html

Some of these appear to conflict, particularly the latter two.

I've tried the methods in both the third and fourth URLs.

No matter what combination of *odbc*.ini files I've tried, I always get:
IM004: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed

Here are the /etc/odbc.ini and /etc/odbcinst.ini, and /home/db2inst1/.odbc.ini
for this situation:

odbc.ini:
[ODBC Data Source]
mindmeld=IBM DB2 ODBC DRIVER

[mindmeld]
Driver=db2
Description=DB2 Mindmeld DB
Trace=Yes
Tracefile=/tmp/sql.log
Port=3700
Database=mindme ld

odbcinst.ini:
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1

[db2]
Description = IBM DB2 ODBC DRIVERR
Driver = /var/opt/IBM/db2/V8.1/lib/libdb2.so
FileUsage = 1

/home/db2inst1/.odbc.ini:

[ODBC Data Source]
mindmeld=IBM DB2 ODBC DRIVER
[mindmeld]
Driver=/var/opt/IBM/db2/V8.1/lib/libdb2.so
Description=db2 mindmeld database
Database=mindme ld

The PHP call to connect I'm using is:

odbc_connect("m indmeld","db2in st1","<the right password>");

The db2inst1 user is able to successfully:
db2 connect to mindmeld user db2inst1 using <the right password>

Thanks in advance,

Rick

Nov 12 '05 #1
1 3676
I continued searching, and found http://www.unixodbc.com/doc/db2.html

Based on its info, I put into odbcinst.ini:
DontDLClose = 1

And the following line into my php script:
putenv("DB2INST ANCE=db2inst1") ;

I can now connect and return a result set. :-)

Rick

Rick Hickerson wrote:
I can't get PHP to connect to DB2 on the same server.

I'm running both Apache/PHP and DB2 on Mandrake Linux 9.2. I didn't
compile PHP; just installed what appear to be the appropriate RPMs (I
don't like to compile/install and ruin RPM dependencies; I've seen the
documents which say to build PHP "--with-ibm-db2=/home/db2inst1/sqllib"):

unixODBC-2.2.6-4mdk
libunixODBC2-2.2.6-4mdk
php-mysql-4.3.2-3mdk
libphp_common43 2-4.3.3-2mdk
php-ini-4.3.3-1mdk
php-xml-4.3.2-3mdk
php-cli-4.3.3-2mdk
unixODBC-gui-gtk-2.2.6-4mdk
php-cgi-4.3.3-2mdk
php-xmlrpc-4.3.2-3mdk
php-pgsql-4.3.2-5mdk
php-imap-4.3.2-3mdk
php-unixODBC-4.3.3-1mdk
unixODBC-gui-qt-2.2.6-4mdk
php-pear-4.3.2-3mdk
php-ldap-4.3.2-3mdk
apache2-mod_php-2.0.47_4.3.2-2mdk
php-xslt-4.3.2-3mdk
libgtkodbcconfi g0-2.2.6-4mdk

I can't find a Mandrake RPM for php-db2 nor php-ibm-db2.

I've found documentation at:

http://www-1.ibm.com/support/docview...&cc=US&lang=en

http://www-1.ibm.com/support/docview...&cc=US&lang=en

http://publib.boulder.ibm.com/infoce...d/t0006349.htm

http://www.unixodbc.org/odbcinst.html

Some of these appear to conflict, particularly the latter two.

I've tried the methods in both the third and fourth URLs.

No matter what combination of *odbc*.ini files I've tried, I always get:
IM004: [unixODBC][Driver Manager]Driver's SQLAllocHandle on
SQL_HANDLE_HENV failed

Here are the /etc/odbc.ini and /etc/odbcinst.ini, and
/home/db2inst1/.odbc.ini for this situation:

odbc.ini:
[ODBC Data Source]
mindmeld=IBM DB2 ODBC DRIVER

[mindmeld]
Driver=db2
Description=DB2 Mindmeld DB
Trace=Yes
Tracefile=/tmp/sql.log
Port=3700
Database=mindme ld

odbcinst.ini:
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1

[db2]
Description = IBM DB2 ODBC DRIVERR
Driver = /var/opt/IBM/db2/V8.1/lib/libdb2.so
FileUsage = 1

/home/db2inst1/.odbc.ini:

[ODBC Data Source]
mindmeld=IBM DB2 ODBC DRIVER
[mindmeld]
Driver=/var/opt/IBM/db2/V8.1/lib/libdb2.so
Description=db2 mindmeld database
Database=mindme ld

The PHP call to connect I'm using is:

odbc_connect("m indmeld","db2in st1","<the right password>");

The db2inst1 user is able to successfully:
db2 connect to mindmeld user db2inst1 using <the right password>

Thanks in advance,

Rick


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1443
by: R.Marquez | last post by:
I tried installing gadfly 1.0 on Mandrake 9.2 and got the following: # python setup.py install running install error: invalid Python installation: unable to open /usr/lib/python2.3/config/Makefile (No such file or directory) # Of course, the error is correct in that there is no such file. There is not even a python2.3/ config directory. Is the Mandrake
0
4535
by: Si | last post by:
Hi, I am having trouble with an install of Oracle 9i Release 2 on Linux Mandrake 9.1. I have 512 MB DDR RAM and a Duron 850 CPU. The install appeared to run fairly seamlessly except for a handful of problems : 1) Oracle complained that it could not set the file permissions on four files. They were
2
23038
by: baumann.Pan | last post by:
hi all, I am programming on linux, my program want to connect a oracle database server to do some SQL statement/procedure. But I don't know how to connect to oracle database on linux OS. anyone can do me a favour? thanks a lot
0
1793
by: GH | last post by:
Hi, I've just setup MySQL on a Linux machine and I'm using Visual Basic in Windows to connect to it (using MySQL ODBC 3.51 driver). Everything works fine for browsing the database (used for stock control), but some parts of the VB program refuse to update the database. It was using an Access database (which worked ok) and I'm using the same SQL statement and table structure. Here's the SQL statement that VB runs:
0
606
by: GH | last post by:
Hi, I've just setup MySQL on a Linux machine and I'm using Visual Basic in Windows to connect to it (using MySQL ODBC 3.51 driver). Everything works fine for browsing the database (used for stock control), but some parts of the VB program refuse to update the database. It was using an Access database (which worked ok) and I'm using the same SQL statement and table structure. Here's the SQL statement that VB runs:
9
3735
by: Steve Jorgensen | last post by:
Hi all, I'm working on the schema for a database that must represent data about stock & bond funds over time. My connundrum is that, for any of several dimension fields, including the fund name itself, the dimension may be represented in different ways over time, and may split or combine from one period to the next. When querying from the database for an arbitrary time period, I need the data to be rolled up to the smallest extent...
10
2171
by: Rhino | last post by:
Has anyone managed to get DB2 V8.1 to install and run on Linux Mandrake 9.1/9.2? I know that IBM does not officially support DB2 on Mandrake but I also know that the clever people who buy DB2 sometimes find a way to do things that aren't supported. Unfortunately, I'm not that clever, especially about installing things. The last time I tried to install DB2 V8.1 on Mandrake, I hit a roadblock that I wasn't able to overcome. There were...
0
2426
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical price of a stock. The program will allow users to query the stock price of a particular date and output its statistics (mean price, median price and standard deviation) for any specified period. Your program must be menu driven and works as follows.
6
4023
by: sugapablo | last post by:
I have an old machine running Mandrake 9.2 and PHP 4.3.1 hosting several websites. With the coming changes to daylight savings time in March 2007, what are my options in correcting the current calculation on this machine? Ideal option: RPM patch. Worst option: upgrade OS (it's a very old machine).
0
10538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.