Bug #8769 [NEW]: Can't get ibm_db2 to work with IIS

From: Date: Sat, 23 Sep 2006 00:18:17 +0000
Subject: Bug #8769 [NEW]: Can't get ibm_db2 to work with IIS
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-5246@lists.php.net to get a copy of this message
From: larry dot menard at rogers dot com Operating system: Windows XP, SP2 PHP version: 5.2.0 RC4 Package: Bug System Bug Type: Bug Bug description: Can't get ibm_db2 to work with IIS Description: ------------ (I'm actually using PHP 5.2.0RC5-dev, but it is not listed in the selection box.) First I had problems getting the ibm_db2 extension to load at all. I had to grant Read and Execute permission to the "IUSR_CS288290-A" account (my host name is CS288290-A) on both the "sqllib\bin" and "sqllib\lib" directories. This should be documented somewhere. After that I found that even a simple test script does not work when run against an IIS server. I know that the db2_connect() is truly not successful because a db2trc shows no DB2 server activity at all. And as you can see, the db2_conn_error() does not seem to pick up the fact that the db2_connect() failed. It works fine against an Apache server and when run via the command prompt. I really would like to get ibm_db2 to work with IIS, but there's no documentation anywhere regarding this. Please advise. Thanks. Reproduce code: --------------- <?php if (key_exists('SERVER_SOFTWARE', $_SERVER)) $br = "<br>"; else $br = "\n"; $dbname = "mydbname"; $userid = "myuserid"; $password = "mypasswd"; printf("Calling db2_connect()...${br}"); $dbconn = db2_connect($dbname, $username, $password); printf("Returned from db2_connect().${br}"); printf("\$dbconn = "); var_dump($dbconn); printf("${br}"); printf("db2_conn_error() returns: "); var_dump(db2_conn_error()); printf("${br}"); if (db2_conn_error()) // db2_connect() is apparently failing but this doesn't seem to be returning true { printf("Connect failed.${br}"); printf("%s.${br}", db2_conn_errormsg ()); } else { printf("Connect successful.${br}"); db2_close($dbconn); } exit; ?> Expected result: ---------------- Calling db2_connect()... Returned from db2_connect(). db2_conn_error() returns: string(0) "" $dbconn = resource(4) of type (DB2 Connection) Connect successful. Actual result: -------------- Calling db2_connect()... Returned from db2_connect(). $dbconn = bool(false) db2_conn_error() returns: string(0) "" Connect successful. Warning: db2_close() expects parameter 1 to be resource, boolean given in C:\MyServer\testIISDB2.php on line 52 PHP Warning: db2_close() expects parameter 1 to be resource, boolean given in C:\MyServer\testIISDB2.php on line 52 -- Edit bug report at http://pecl.php.net/bugs/bug.php?id=8769&edit=1 --

« previous php.pear.webmaster (#5246) next »