Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Location
    central ny
    Posts
    6

    Unanswered: DB2 + PHP + RH Linux....

    So, I recompiled PHP 4.2.2 to add --with-ibm-db2 and it seemed to compile w/o error and I proceeded to follow the IBM instructions provided at http://www7b.boulder.ibm.com/dmdd/li...614_scott.html

    which included adding a line to my /etc/ld.so.conf (the line "/etc/httpd/modules")

    and also adding a line to the top of /etc/rc.d/init.d/httpd (the line being ". /home/db2inst1/sqllib/db2profile" in order to make sure apache 'inherits the db2 environment variables')

    anyways... i try to run a php to connect to the database... which contains these lines (and the vars are set to the correct values):

    $dbconn = odbc_connect($dbname, $username, $password);

    (which is line 8 of this file...) when executed, it returns:

    Warning: SQL error: , SQL state yT>T@X9cA@B in SQLConnect in /var/www/html/db2php/db2lib.php on line 8

    (yes, it outputs those garbage characters)

    and i can't seem to figure out what the heck the problem is.... anyone seen this kind of error before?

    any help would be VERY appreciated, and of course any more detail you might need i'm happy to supply.

    TIA!!!


    -Doug Smith

    p.s. DB2 works like a charm via command line.....

  2. #2
    Join Date
    Jun 2002
    Location
    central ny
    Posts
    6
    In my case, it was actually something simple that was causing my problem with DB2/PHP SQL connection. When I would try to create a connection to DB2, I would get some garbage characters... What I actually needed to do was install "DB2 Connect" (i had forgotten to[*] it during install )

    Other than that, it shouldn't be much more than compiling PHP --with-ibm-db2.

    HTH

    DB2 -- Cause the only platform Oracle runs well on, is the overhead projector

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •