odbc_connect fails & returns 1 on attempt

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


Curious to see if anyone has had a similar issue.

- solaris 2.8, sparc
- apache 1.3.31
- php v. 5.0.3
- using easysoft odbc drivers
- using unixODBC
- apache built with php and required odbc/easysoft/unixODBC libraries
statically linked (some)
- connecting to MSSQL 2000

the problem is with this code:

// the $connect variable contains the full {DSN=blah;SERVER=blah;PORT...
$cnx = odbc_pconnect($connect, $uid, $pwd) || printf("ERROR CONNECTING<p>");

if ($cnx == 0) {

    printf ("unable to establish connection - $cnx");

} else {

    echo $cnx;
    $rs = odbc_exec($cns, "use db;");


the odbc_connect will return the value of "1" to the $cnx handle.  anyone
ever see this?  no errors are thrown (from program output, or apache error
logs).  the auth seems to work OK... when I change the pwd to something
incorrect, the proper errors pop up.

i'm new to php, is there further debugging that I can do?  the MSSQL box is
offsite and i won't be able to do detailed error analysis from it's logs.

i 'trace'd the php command from the command line, which produced the same
error, with the trace not really showing any fruitful details from the calls

i guess this is more of a unixODBC or easysoft issue, but was just wondering
if anyone has noticed this return type.

thanks in advance,

Site Timeline