Hello all,
have some problems to connect my php script to a remote interbase running on
W2K Server!
My systems:
DB-Server: W2K Server with interbase 5.x
Webserver: SuSE 8.0 with apache 1.3.23 and php 4.1.0
Problem:
I want to use the odbc_connect() to connect to the remote DB-Server, from
the shell with isql it works!
my scripts:
odbc.ini:
[dtm]
Driver = INTERBASE
Description = interbase driver
Database = 192.168.2.29:d:/ES2000/DB/IBSQL/DTM/DTM.gdb
User = something
Password = something
With_Schema = 0
Dialect = 1
Charset =
Role =
Nowait = 0
odbcinst.ini
[INTERBASE]
Description = Easysoft Driver for Interbase
Driver = /usr/lib/libib7odbc.so
Setup = /usr/lib/libib7odbcS.so
FileUsage = 1
DontDLClose = 1
Trace = Yes
Trace File = /var/log/sql-log
If I do a connection from the shell with: "isql -v dtm" it works, but with
the php it doesn't.
my php:
<?PHP
include("header.php");
putenv("LD_LIBRARY_PATH=/usr/lib");
putenv("ODBCINSTINI= /etc/odbcinst.ini");
putenv("ODBCINI= /etc/odbc.ini");
$db = "dtm";
$connection = odbc_connect($db,'','') or die (odbc_errormsg());
include("../include/footer.php");
?>
It fails with the errormsg:
Warning: SQL error: [iODBC][Driver Manager]Specified driver could not be
loaded, SQL state IM003 in SQLConnect in /www/dtm/katalog/test.php on line 8
[iODBC][Driver Manager]Specified driver could not be loaded
Where line 8 is the line with: "$connection = odbc_connect('dtm','','') or
die (odbc_errormsg());"
Even if I declare the $db with the location of the database and username and
password?
Where is my fault?
Maybe anbody can help me...
Regards
Christian
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php