Hi,
I have Zend Core for IBM installed on a Red Hat Enterprise 5.
I’m trying to connect to an IDS 10 on another server. I’ve been trying for 2 days now, and nothing works… anyone have experience with the same setup and got it to work?
What I tried first:
Modified $INFORMIXDIR/etc/sqlhosts & /etc/services.
Modified /etc/hosts.equiv on DB server to include webserver
Set INFORMIXDIR & LD_LIBRARY_PATH to point to the Zend Core directory. Didn’t work.
Then I downloaded the CSDK and pointed both to the CSDK install directory. Didn’t work.
I’ve set following env variables:
export INFORMIXDIR=/opt/informix
export PATH=$INFORMIXDIR/bin:$PATH
export INFORMIXSERVER=demo_on
export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts
export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql:$LD_LIBRARY_PATH
export CLIENT_LOCALE=en_us.819
export DB_LOCALE=en_us.819
I’ve tried setting them in:
/etc/profile.d/informix.sh
/etc/bashrc
ð Both show the variables as set when I echo them on the command prompt
But this didn’t set them in PHP.
I’ve tried adding them to the envvars file in the apache bin directory, which gets loaded before starting httpd…
I’ve tried adding them in httpd.conf (KEEPENV & PUTENV)…
I’ve tried having them all at once…
But I still can’t connect…
This is the script I use: (which works when I have it on windows)
(using pdo_informix)
<?php
try {
$db = new PDO("informix:host=192.168.10.34;service=50000;database=testdb;server=demo_on;protocol=olsoctcp;client_locale=en_us.819;db_locale=en_us.819", "informix", "********");
$res = $db->query("select * from users");
foreach ($res as $row) {
print_r($row);
}
echo "No error";
} catch (Exception $e) {
print_r($e);
}
?>
This is the error I get at the moment (with CSDK):
PDOException Object
(
[message:protected] => SQLSTATE=08001, SQLDriverConnect: -1013 [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3".
[string:private] =>
[code:protected] => 0
[file:protected] => /usr/local/apache2/htdocs/test.php
[line:protected] => 7
[trace:private] => Array
(
[0] => Array
(
[file] => /usr/local/apache2/htdocs/test.php
[line] => 7
[function] => __construct
[class] => PDO
[type] => ->
[args] => Array
(
[0] => informix:host=192.168.10.34;service=50000;database=testdb;server=demo_on;protocol=olsoctcp;client_locale=en_us.819;db_locale=en_us.819
[1] => informix
[2] => ********
)
)
)
[errorInfo] =>
)
Any ideas? Would be very very very greatfull…
How does pdo_ibm work with Informix btw? Tried that as well, but didn’t work either J
Tnx in advance
Jeroen Keppens
Cheers
Paul
_______________________________________________
Informix-list mailing list
Inform...@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
And yes, I've found that anything later than PHP 5.2.2 won't allow
pdo_informix to compile in a source build.
Brad
Tnx all for the info.
I just installed unixODBC-2.2.12 and I’m now trying to make it work… unfortunately it doesn’t:
Env vars INFORMIXDIR=/opt/informix, ODBCINI=/etc/odbc.ini, LD_LIBRARY_PATH are set.
odbcinst –j
unixODBC 2.2.12
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
USER DATA SOURCES..: /etc/odbc.ini
/etc/odbcinst.ini => /usr/local/etc/odbcinst.ini (symbolic link)
[ODBC Drivers]
IBM INFORMIX ODBC DRIVER=Installed
[Informix]
Description=
Driver=/opt/informix/lib/cli/iclis09b.so
#Setup=
APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.51
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y
/etc/odbc.ini => /usr/local/etc/odbc.ini (symbolic link)
[r69db]
Driver=Informix
Database=testdb
LogonID=informix
pwd=******
Servername=demo_on
CLIENT_LOCALE=en_us.8859-1
DB_LOCALE=en_us.8859-1
TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so
[ODBC]
Trace=0
TraceFile=/tmp/odbctrace.out
I tried both drivers iclis09b.so & iclit09b.so without luck.
When I do “isql –v r69db” I get following output:
[IM009][unixODBC][Informix][Informix ODBC Driver]Unable to load translation shared library (DLL).
[ISQL]ERROR: Could not SQLConnect
I’ve checked and /opt/informix/lib/esql/igo4a304.so exists.
ldd /opt/informix/lib/esql/igo4a304.so
linux-gate.so.1 => (0x00548000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
/lib/ld-linux.so.2 (0x008da000)
ldd /opt/informix/lib/cli/iclis09b.so
linux-gate.so.1 => (0x0068c000)
libifgls.so => /opt/informix/lib/esql/libifgls.so (0x00b5f000)
libifglx.so => /opt/informix/lib/esql/libifglx.so (0x0069f000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
libm.so.6 => /lib/libm.so.6 (0x00250000)
libdl.so.2 => /lib/libdl.so.2 (0x00d8b000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00277000)
/lib/ld-linux.so.2 (0x008da000)
ldd /opt/informix/lib/cli/iclit09b.so
linux-gate.so.1 => (0x002e5000)
libifgls.so => /opt/informix/lib/esql/libifgls.so (0x001f1000)
libifglx.so => /opt/informix/lib/esql/libifglx.so (0x0058d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00e00000)
libc.so.6 => /lib/libc.so.6 (0x00a4f000)
libm.so.6 => /lib/libm.so.6 (0x00110000)
libdl.so.2 => /lib/libdl.so.2 (0x00bf8000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00137000)
/lib/ld-linux.so.2 (0x008da000)
So, I’m out of ideas… it’s probably something stupid, but I can’t find it…
Tnx for your help,
Jeroen K
From: Mary.Muraski
[mailto:mary.mu...@adelphia.net]
Sent: donderdag 24 januari 2008 0:53
To: Jeroen Keppens
Subject: Re: PHP & Informix on Red Hat Enterprise 5
Zendcore needs an odbc driver manager to work, That is why this works under Windows so well.
If you install and configure the UnixODBC, create a data source to point to the odbc.ini file this should work.
----- Original Message -----
From: Jeroen Keppens
Newsgroups: comp.databases.informix
Sent: Wednesday, January 23, 2008 10:33 AM
Subject: PHP & Informix on Red Hat Enterprise 5
Hi,
I checked and I have CSDK.2.90.UC4.
I can’t find UC6 on the IBM site. Does anyone have the linux 32bit available that I can download?
Tnx,
Jeroen K
From: Sheshnarayan Agrawal
[mailto:shag...@in.ibm.com]
Sent: donderdag 24 januari 2008 16:41
To: Jeroen Keppens
Cc: inform...@iiug.org; informix-l...@iiug.org
Subject: RE: PHP & Informix on Red Hat Enterprise 5
>[IM009][unixODBC][Informix][Informix
ODBC Driver]Unable to load translation shared library (DLL). [ISQL]ERROR: Could
not SQLConnect
Shesh : What
version of CSDK (ODBC) are you using? If you are using CSDK <=
2.90.xC5 you will encouter this problem. This was fixed (PTS : 175992) from
CSDK 2.90.xC6 onwards with respect to unixODBC DM. Beside if you use unixODBC
DM <= 2.2.8 you will not encounter this problem. There was some change in
unixODBC DM 2.2.11 onwards which caused this failure and we also needed some
changes(PTS : 175992) to fix that.
-Shesh
|
"Jeroen
Keppens" <jeroen....@nmv.be> 24/01/2008 20:35 |
|
Jeroen Keppens_______________________________________________
This is like deja-vous all over again! The current release of the CSDK
is 3.00, you CAN download that release from the IBM site and that works
fine.
Art S. Kagel
>
>
> Tnx,
>
> Jeroen K
>
>
>
> *From:* Sheshnarayan Agrawal [mailto:shag...@in.ibm.com]
> *Sent:* donderdag 24 januari 2008 16:41
> *To:* Jeroen Keppens
> *Cc:* inform...@iiug.org; informix-l...@iiug.org
> *Subject:* RE: PHP & Informix on Red Hat Enterprise 5
>
>
>
>
> >[IM009][unixODBC][Informix][Informix ODBC Driver]Unable to load
> translation shared library (DLL). [ISQL]ERROR: Could not SQLConnect
>
> Shesh : What version of CSDK (ODBC) are you using? If you are using
> CSDK <= 2.90.xC5 you will encouter this problem. This was fixed (PTS :
> 175992) from CSDK 2.90.xC6 onwards with respect to unixODBC DM. Beside
> if you use unixODBC DM <= 2.2.8 you will not encounter this problem.
> There was some change in unixODBC DM 2.2.11 onwards which caused this
> failure and we also needed some changes(PTS : 175992) to fix that.
>
> -Shesh
>
>
===========================================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.oninit.com/home/disclaimer.php
===========================================================================================
Art S. Kagel (Oninit LLC) wrote:
> Jeroen Keppens wrote:
> >
> > Hi,
> >
> >
> >
> > I checked and I have CSDK.2.90.UC4.
> >
> >
> >
> > I can't find UC6 on the IBM site. Does anyone have the linux 32bit
> > available that I can download?
> >
>
> This is like deja-vous all over again! The current release of the CSDK
> is 3.00, you CAN download that release from the IBM site and that works
> fine.
I wouldn't blame Jeroen. I was confused the first time I tried to get
the CSDK too (under Trials?, at a search result page? what the ...?)
Jeroen, _if you can afford it_, try a real language, like Python or
Ruby.
With kind regards,
Jeroen K
I just got 5.2.5 working with apache 2 on aix, but it was a real bitch
to get built, it took like 2 days of hacking the configure script.
I'd build it from source if I were you. We used the CSDK 3.0
That said, you can build any pdo module into php statically (see the
php website for details), which is what we did for informix.
It's working with IDS 9.3, too, by the way.
M.