Problem with odbc_connect()
Posted in 2003
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Internationalization & Character Sets
Hi everybody,
i installed ifx9.30 on Suse Linux 8.2 with apache 1.32 and php 4.3.1 (
recompiled with informix extension ) but when i try to use odbc_connect i
recieve an error
linux:/srv/www/htdocs # php db.inc
Content-type: text/html
X-Powered-By: PHP/4.3.1
<br />
<b>Warning</b>: SQL error: [Informix][Informix ODBC
Driver][Informix]Unspecifie
d System Error = -25553., SQL state S1000 in SQLConnect in
<b>/srv/www/htdocs/d
b.inc</b> on line <b>5</b><br />
linux:/srv/www/htdocs #
db.inc contains :
<?
putenv("ODBCINI=/usr/ifmx93ol/etc/odbc.ini");
putenv("ODBCINSTINI=/usr/ifmx93ol/etc/odbcinst.ini");
putenv("LD_LIBRARY_PATH=/usr/ifmx93ol/lib:/usr/ifmx93ol/lib:/usr/ifmx93ol/li
b/e$
$connect=odbc_connect("test","","");
?>
where test has been configured ion /usr/ifmx93ol/etc/odbc.ini as follow
[test]
Driver=/usr/ifmx93ol/lib/cli/iclis09b.so
Description=INFORMIX 3.3 32-BIT
Database=arkdat
LogonID=
pwd=
Servername=dbs0user_shm
CursorBehavior=0
CLIENT_LOCALE=en_us.8859-1
DB_LOCALE=en_us.8859-1TRANSLATIONDLL=/usr/ifmx93ol/lib/esql/igo4a304.so
[ODBC]
Trace=0
TraceFile=/tmp/odbctrace.out
InstallDir=/usr/ifmx93ol
the informix appplication works fine. The only problem is the odbc
connection with php.
Thanks
Luigi
You are missing INFORMIXDIR environment variable! Put he following line in your db.inc file:
putenv("INFORMIXDIR=/usr/ifmx93ol");
Gorazd
"Luigi" <lcarabiniere@atinno.com> wrote in message news:bot0b3$1hi0$1@stargate1.inet.it...
> Hi everybody,
> i installed ifx9.30 on Suse Linux 8.2 with apache 1.32 and php 4.3.1 (
> recompiled with informix extension ) but when i try to use odbc_connect i
> recieve an error
>
> linux:/srv/www/htdocs # php db.inc
> Content-type: text/html
> X-Powered-By: PHP/4.3.1
>
> <br />
> <b>Warning</b>: SQL error: [Informix][Informix ODBC
> Driver][Informix]Unspecifie
> d System Error = -25553., SQL state S1000 in SQLConnect in
> <b>/srv/www/htdocs/d
> b.inc</b> on line <b>5</b><br />
> linux:/srv/www/htdocs #
>
> db.inc contains :
>
> <?
> putenv("ODBCINI=/usr/ifmx93ol/etc/odbc.ini");
> putenv("ODBCINSTINI=/usr/ifmx93ol/etc/odbcinst.ini");
> putenv("LD_LIBRARY_PATH=/usr/ifmx93ol/lib:/usr/ifmx93ol/lib:/usr/ifmx93ol/li
> b/e$
> $connect=odbc_connect("test","","");
> ?>
>
> where test has been configured ion /usr/ifmx93ol/etc/odbc.ini as follow
>
> [test]
> Driver=/usr/ifmx93ol/lib/cli/iclis09b.so
> Description=INFORMIX 3.3 32-BIT
> Database=arkdat
> LogonID=
> pwd=
> Servername=dbs0user_shm
> CursorBehavior=0
> CLIENT_LOCALE=en_us.8859-1
> DB_LOCALE=en_us.8859-1> TRANSLATIONDLL=/usr/ifmx93ol/lib/esql/igo4a304.so
>
> [ODBC]
> Trace=0
> TraceFile=/tmp/odbctrace.out
> InstallDir=/usr/ifmx93ol
>
>
> the informix appplication works fine. The only problem is the odbc
> connection with php.
>
> Thanks
> Luigi
>
>
"Luigi" <lcarabiniere@atinno.com> wrote in message news:<bot0b3$1hi0$1@stargate1.inet.it>...
> Hi everybody,
> i installed ifx9.30 on Suse Linux 8.2 with apache 1.32 and php 4.3.1 (
> recompiled with informix extension ) but when i try to use odbc_connect i
> recieve an error
>
> linux:/srv/www/htdocs # php db.inc
> Content-type: text/html
> X-Powered-By: PHP/4.3.1
>
> <br />
> <b>Warning</b>: SQL error: [Informix][Informix ODBC
> Driver][Informix]Unspecifie
> d System Error = -25553., SQL state S1000 in SQLConnect in
> <b>/srv/www/htdocs/d
> b.inc</b> on line <b>5</b><br />
> linux:/srv/www/htdocs #
>
> db.inc contains :
>
> <?
> putenv("ODBCINI=/usr/ifmx93ol/etc/odbc.ini");
> putenv("ODBCINSTINI=/usr/ifmx93ol/etc/odbcinst.ini");
> putenv("LD_LIBRARY_PATH=/usr/ifmx93ol/lib:/usr/ifmx93ol/lib:/usr/ifmx93ol/li
> b/e$
> $connect=odbc_connect("test","","");
> ?>
>
> where test has been configured ion /usr/ifmx93ol/etc/odbc.ini as follow
>
> [test]
> Driver=/usr/ifmx93ol/lib/cli/iclis09b.so
> Description=INFORMIX 3.3 32-BIT
> Database=arkdat
> LogonID=
> pwd=
> Servername=dbs0user_shm
> CursorBehavior=0
> CLIENT_LOCALE=en_us.8859-1
> DB_LOCALE=en_us.8859-1> TRANSLATIONDLL=/usr/ifmx93ol/lib/esql/igo4a304.so
>
> [ODBC]
> Trace=0
> TraceFile=/tmp/odbctrace.out
> InstallDir=/usr/ifmx93ol
>
>
> the informix appplication works fine. The only problem is the odbc
> connection with php.
>
> Thanks
> Luigi
Luigi,
Take a look at http://www.iodbc.org/odbc-phpHOWTO.html as it might help.
Kingsley Idehen
OpenLink Software