If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Sapdb + Php?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-09-03, 04:41
nyxatko nyxatko is offline
Registered User
 
Join Date: Sep 2003
Posts: 1
Post 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
Reply With Quote
  #2 (permalink)  
Old 10-18-03, 15:21
bkersey bkersey is offline
Registered User
 
Join Date: Oct 2003
Location: SLC, Utah
Posts: 1
Same problem

Did you find a solution for this?
Thanks
Bill
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On