Hello:

I am trying to use the iodbc driver to connect to an orable database running
on an NT server.

Here is the code(test.php):
<?
putenv("ODBCINSTINI=/usr/local/odbc/odbcsdk/doc/odbcinst.ini");
putenv("ODBCINI=/usr/local/odbc/odbcsdk/doc/odbc.ini");
$connect = odbc_connect("dbName", "userName", "password");
?>

I get this error message:
Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host, SQL state 08004 in
SQLConnect in test.php on line 4

Here is what I did:
cd /usr/local
lynx ftp://www.openlinksw.com/open40/l3kozzzz.taz
mkdir odbc
cd odbc
tar zxvf ../l3kozzzz.taz

cd /usr/local/php-4.0.6

./configure --with-zlib --with-iodbc=/usr/local/odbc/odbcsdk --with-mysql=/u
sr/local/mysql  --with-apxs=/usr/local/apache/bin/apxs
make
make install

cp php.ini-dist /usr/local/lib/php.ini
cp /usr/local/odbc/odbcsdk/lib/* /usr/lib

vi /usr/local/odbc/odbcsdk/doc/odbc.ini and edited it to have this:
[ODBC Data Sources]
OpenLink = OpenLink Generic ODBC Driver

[OpenLink]
Driver          = /usr/lib/oplodbc.so.1
Description     = Sample OpenLink MT DSN
Host            = xx.xx.xx.xx          <-- This is the IP address of my NT
server
ServerType      = Oracle 8.1
FetchBufferSize = 99
UserName        = userName                 <-- I changes the db name, user, and pass
Password        = password
Database        = dbName
ServerOptions   =
ConnectOptions  =
Options         =
ReadOnly        = no

[Default]
Driver = /usr/lib/oplodbc.so.1



vi /usr/local/odbc/odbcsdk/doc/odbcinst.ini and made its content into:
[ODBC Drivers]
OpenLink Generic ODBC Driver = Installed

[OpenLink Generic ODBC Driver]
Driver = /usr/lib/oplodbc.so.1
Setup  = /usr/lib/oplodbc.so.1


Any ideas why I am getting a hostname error with an IP address?

Thanks,
        Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.    (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development    Ecommerce, Java, JSP, servlets, databases


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to