Edit report at https://bugs.php.net/bug.php?id=12702&edit=1
ID: 12702 Comment by: mlimacarlos at gmail dot com Reported by: ctr2sprt at yahoo dot com Summary: odbc_connect() and odbc_pconnect() fail Status: Not a bug Type: Bug Package: ODBC related Operating System: Debian GNU/Linux PHP Version: 4.0.6 Block user comment: N Private report: N New Comment: You can change /etc/odbc.ini and config with the follow statements: [conn] Description= DB2 Driver Driver = DB2 DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={DB2INSTANCE=db2instl} Previous Comments: ------------------------------------------------------------------------ [2003-03-21 02:06:03] vit at uptsoft dot com Hi All I spent 2 days resolving this problem and the solution is so stupid. Just add two line into /etc/rc.d/init.d/httpd : DB2INSTANCE=db2inst1 export DB2INSTANCE Good luck ------------------------------------------------------------------------ [2002-10-17 08:15:24] kalow...@php.net this sounds more like a bug in unixODBC than in PHP. The unixODBC is failing to create a SQL_HANDLE_HENV, to which no connection can be made without. Nothing PHP can do about this. You may want to talk to unixODBC people about this. ------------------------------------------------------------------------ [2002-10-17 08:05:05] jm dot poure at freesurf dot fr My configuration is : - Linux RedHat 7.3 - UnixODBC-2.2.0.5 - php-4.1.2-7 - Ingres database I am trying to connect to an Ingres database and get the very same error message from PHP. I can connect to my DSN using isql without problem. $connect = odbc_pconnect("mydsn", "my_user", "my_password"); returns -> Warning: SQL error: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed, SQL state IM004 in SQLConnect in /var/www/html/interepv3/test_ingres_odbc.php on line 5 ------------------------------------------------------------------------ [2002-02-26 10:39:41] kalow...@php.net No feedback was provided for this bug, so it is being suspended. If you are able to provide the information that was requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-02-04 15:40:58] kalow...@php.net Please try a recent release as this behavior seems to have been resolved. If the recent release doesn't work well... we'll have to see what else can be causing it. :\ ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=12702 -- Edit this bug report at https://bugs.php.net/bug.php?id=12702&edit=1