Results 1 to 2 of 2

Thread: Sapdb + Php?

  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Post Unanswered: Sapdb + Php?

    any experience getting sapdb+php to run?

    sapdb is running, jdbc connection is ok, database instance is created etc...

    in /etc/odbc.ini (+ symlink to /(var|usr)/spool/sql/config/odbc.ini and /home/httpd/.odbc):

    [TST]
    ServerDB=TST
    ServerNode=localhost
    Driver = /home/sapdb/indep_prog/lib/libsqlod.so


    and i get:
    Establishing database connection.
    Warning: SQL error: [SAP AG][LIBSQLOD SO]Data source name not found and no default driver specified., SQL state IM002 in SQLConnect in /home/httpd/htdocs/test/odbc.php on line 8
    Connection failed.

    // the php script
    putenv("ODBCINSTINI=/etc/odbcinst.ini");
    putenv("ODBCINI=/etc/odbc.ini");

    phpinfo();

    echo "Establishing database connection.";
    $conn = odbc_connect("TST;","DBA","DBA") or die ("Connection failed.");
    echo "Connection established.";

    odbc_close($conn);
    echo "Connection closed";

    -----------------------

    I think, the php has some trouble locating odbc.ini

    php was compiled with --with-sapdb=/home/sapdb/indep_prog

  2. #2
    Join Date
    Oct 2003
    Location
    SLC, Utah
    Posts
    1

    Same problem

    Did you find a solution for this?
    Thanks
    Bill

Posting Permissions

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