odbc_connect fails & returns 1 on attempt

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dan byers

    odbc_connect fails & returns 1 on attempt


    Greetings,

    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;SERVE R=blah;PORT...
    etc)
    $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;");
    odbc_close($cnx );

    }

    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
    made.

    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,
    Dan



Working...