RE: [PHP] php/Oracle db connection

2001-10-29 Thread toni baker

After running openlink.sh and the set command the
following variables or set:

ODBCINI=/usr/local/src/bin/odbc.ini
ODBCINSTINI=/usr/local/src/bin/odbcinst.ini
OLDPWD=/home/httpd/html/ronsdev
OPTERR=1
OPTIND=1
ORACLE_HOME=/home/oracle/OraHome1
ORACLE_SID=data1  

However when odbctest I still get the following error:

Enter ODBC connect string (? shows list):
DSN=[pc963];UID=test;PWD=test
OpenLink: RPC: Unknown host
[OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004
[OpenLink][ODBC]Connection rejected by data source,
SQLSTATE=08004

Have a nice day.[tbaker@PC963 tbaker]$
/usr/local/src/odbcsdk/examples/odbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor

Enter ODBC connect string (? shows list):
DSN=[pc963];UID=scott;PWD=tiger
OpenLink: RPC: Unknown host
[OpenLink][ODBC]RPC: Unknown host, SQLSTATE=08004
[OpenLink][ODBC]Connection rejected by data source,
SQLSTATE=08004

Any ideas as to what may be the problem. 

--- Andrew Hill [EMAIL PROTECTED] wrote:
 Toni,
 
 You need to enter a string of the syntax:
 
 DSN=[name of your dsn]
 
 Since nothing shows up with a ? I bet you haven't
 set your ODBCINI
 environment variables.
 Running the openlink.sh against the current shell
 should do this:  .
 openlink.sh
 If you are doing it by hand, you need to set:
 ODBCINI (pointing to the odbc.ini)
 ODBCINSTINI (pointitng to the odbcinst.ini)
 LD_LIBARARY_PATH (pointing to the lib directory that
 contains the
 libiodbc.so file)
 
 DSNs need to be configured in the odbc.ini
 
 Best regards,
 Andrew Hill
 Director of Technology Evangelism
 OpenLink Software  http://www.openlinksw.com
 Universal Data Access  Data Integration Technology
 Providers
 
  -Original Message-
  From: toni baker [mailto:[EMAIL PROTECTED]]
  Sent: Friday, October 26, 2001 11:11 AM
  To: [EMAIL PROTECTED];
 [EMAIL PROTECTED]
  Subject: RE: [PHP] php/Oracle db connection
 
 
  When I run odbctest I get the following prompt:
 
  OpenLink ODBC Demonstration program
  This program shows an interactive SQL processor
 
  Enter ODBC connect string (? shows list): ?
 
  DSN| Description
 

---
 
  Enter ODBC connect string (? shows list):
 
  What ODBC connet string should I enter here?
 
  Thanks Toni.
 
  --- Andrew Hill [EMAIL PROTECTED] wrote:
   Toni,
  
   Note the Unknown host.
   Check your odbc.ini for the Host field of the
 DSN
   you are using.
   Ensure it's resolvable.  Try an IP address
 instead
   maybe.
  
   Also, set the variables in the environment and
 see
   if your DSN works in
   odbctest without PHP in the mix.
  
   Best regards,
   Andrew Hill
   Director of Technology Evangelism
   OpenLink Software  http://www.openlinksw.com
   Universal Data Access  Data Integration
 Technology
   Providers
  
-Original Message-
From: toni baker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 4:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php/Oracle db connection
   
   
I have successfully compiled php with linked
 iODBC
driver manager as an Apache shared module.
   However
when trying to connect php to the Oracle
 database
   I
get an error.  The error and the sample
 connection
code is below.
   
Warning: SQL error: [OpenLink][ODBC]RPC:
 Unknown
   host,
SQL state 08004 in SQLConnect in
/home/httpd/html/ronsdev/putenv.php on line 9
can not connect to DSN: data1.tsl.state.tx.us
   
?
   
  
 

putenv(LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib);
   
  
 

putenv(ODBCINSTINI=/usr/local/src/bin/odbcinst.ini);
putenv(ODBCINI=/usr/local/src/bin/odbc.ini);
$dsn=data1.tsl.state.tx.us;
$user=scott;
$password=tiger;
$sql=SELECT * FROM scott.emp;
if($conn_id=odbc_connect($dsn,,)) {
  echo connected to DSN: $dsn;
if($result=odbc_do($conn_id, $sql)) {
  echo executing '$sql';
  echo Results: ;
  odbc_result_all($result);
  echo freeing result;
  odbc_free_result($result);
}
else {
  echo can not execute '$sql';
}
  echo closing connection $conn_id;
  odbc_close($conn_id);
}
else {
  echo can not connect to DSN: $dsn;
}
?
   
Can someone help with this?
Thanks Toni
   
   
 __
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
   
--
PHP General 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]
   
   
   
  
  
  
   --
   PHP General 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

RE: [PHP] php/Oracle db connection

2001-10-26 Thread Andrew Hill

Toni,

You need to enter a string of the syntax:

DSN=[name of your dsn]

Since nothing shows up with a ? I bet you haven't set your ODBCINI
environment variables.
Running the openlink.sh against the current shell should do this:  .
openlink.sh
If you are doing it by hand, you need to set:
ODBCINI (pointing to the odbc.ini)
ODBCINSTINI (pointitng to the odbcinst.ini)
LD_LIBARARY_PATH (pointing to the lib directory that contains the
libiodbc.so file)

DSNs need to be configured in the odbc.ini

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: toni baker [mailto:[EMAIL PROTECTED]]
 Sent: Friday, October 26, 2001 11:11 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: [PHP] php/Oracle db connection


 When I run odbctest I get the following prompt:

 OpenLink ODBC Demonstration program
 This program shows an interactive SQL processor

 Enter ODBC connect string (? shows list): ?

 DSN| Description
 ---

 Enter ODBC connect string (? shows list):

 What ODBC connet string should I enter here?

 Thanks Toni.

 --- Andrew Hill [EMAIL PROTECTED] wrote:
  Toni,
 
  Note the Unknown host.
  Check your odbc.ini for the Host field of the DSN
  you are using.
  Ensure it's resolvable.  Try an IP address instead
  maybe.
 
  Also, set the variables in the environment and see
  if your DSN works in
  odbctest without PHP in the mix.
 
  Best regards,
  Andrew Hill
  Director of Technology Evangelism
  OpenLink Software  http://www.openlinksw.com
  Universal Data Access  Data Integration Technology
  Providers
 
   -Original Message-
   From: toni baker [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, October 25, 2001 4:56 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] php/Oracle db connection
  
  
   I have successfully compiled php with linked iODBC
   driver manager as an Apache shared module.
  However
   when trying to connect php to the Oracle database
  I
   get an error.  The error and the sample connection
   code is below.
  
   Warning: SQL error: [OpenLink][ODBC]RPC: Unknown
  host,
   SQL state 08004 in SQLConnect in
   /home/httpd/html/ronsdev/putenv.php on line 9
   can not connect to DSN: data1.tsl.state.tx.us
  
   ?
  
 
 putenv(LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib);
  
 
 putenv(ODBCINSTINI=/usr/local/src/bin/odbcinst.ini);
   putenv(ODBCINI=/usr/local/src/bin/odbc.ini);
   $dsn=data1.tsl.state.tx.us;
   $user=scott;
   $password=tiger;
   $sql=SELECT * FROM scott.emp;
   if($conn_id=odbc_connect($dsn,,)) {
 echo connected to DSN: $dsn;
   if($result=odbc_do($conn_id, $sql)) {
 echo executing '$sql';
 echo Results: ;
 odbc_result_all($result);
 echo freeing result;
 odbc_free_result($result);
   }
   else {
 echo can not execute '$sql';
   }
 echo closing connection $conn_id;
 odbc_close($conn_id);
   }
   else {
 echo can not connect to DSN: $dsn;
   }
   ?
  
   Can someone help with this?
   Thanks Toni
  
   __
   Do You Yahoo!?
   Make a great connection at Yahoo! Personals.
   http://personals.yahoo.com
  
   --
   PHP General 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]
  
  
  
 
 
 
  --
  PHP General 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]
 


 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com

 --
 PHP General 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]






-- 
PHP General 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]




[PHP] php/Oracle db connection

2001-10-25 Thread toni baker

I have successfully compiled php with linked iODBC
driver manager as an Apache shared module.  However
when trying to connect php to the Oracle database I
get an error.  The error and the sample connection
code is below.

Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host,
SQL state 08004 in SQLConnect in
/home/httpd/html/ronsdev/putenv.php on line 9
can not connect to DSN: data1.tsl.state.tx.us 

?
putenv(LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib);
putenv(ODBCINSTINI=/usr/local/src/bin/odbcinst.ini);
putenv(ODBCINI=/usr/local/src/bin/odbc.ini);
$dsn=data1.tsl.state.tx.us;
$user=scott;
$password=tiger;
$sql=SELECT * FROM scott.emp;
if($conn_id=odbc_connect($dsn,,)) {
  echo connected to DSN: $dsn;
if($result=odbc_do($conn_id, $sql)) {
  echo executing '$sql';
  echo Results: ;
  odbc_result_all($result);
  echo freeing result;
  odbc_free_result($result);
}
else {
  echo can not execute '$sql';
}
  echo closing connection $conn_id;
  odbc_close($conn_id);
}  
else {
  echo can not connect to DSN: $dsn;
}
?  

Can someone help with this?
Thanks Toni 

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-- 
PHP General 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]




Re: [PHP] php/Oracle db connection

2001-10-25 Thread Frewuill Rodriguez

Check data1.tsl.state.tx.us it I can't even ping it.. try using IP adress
instead or check that name.

- Original Message -
From: toni baker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 25, 2001 4:56 PM
Subject: [PHP] php/Oracle db connection


 I have successfully compiled php with linked iODBC
 driver manager as an Apache shared module.  However
 when trying to connect php to the Oracle database I
 get an error.  The error and the sample connection
 code is below.

 Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host,
 SQL state 08004 in SQLConnect in
 /home/httpd/html/ronsdev/putenv.php on line 9
 can not connect to DSN: data1.tsl.state.tx.us

 ?
 putenv(LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib);
 putenv(ODBCINSTINI=/usr/local/src/bin/odbcinst.ini);
 putenv(ODBCINI=/usr/local/src/bin/odbc.ini);
 $dsn=data1.tsl.state.tx.us;
 $user=scott;
 $password=tiger;
 $sql=SELECT * FROM scott.emp;
 if($conn_id=odbc_connect($dsn,,)) {
   echo connected to DSN: $dsn;
 if($result=odbc_do($conn_id, $sql)) {
   echo executing '$sql';
   echo Results: ;
   odbc_result_all($result);
   echo freeing result;
   odbc_free_result($result);
 }
 else {
   echo can not execute '$sql';
 }
   echo closing connection $conn_id;
   odbc_close($conn_id);
 }
 else {
   echo can not connect to DSN: $dsn;
 }
 ?

 Can someone help with this?
 Thanks Toni

 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com

 --
 PHP General 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]


-- 
PHP General 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]




RE: [PHP] php/Oracle db connection

2001-10-25 Thread Andrew Hill

Toni,

Note the Unknown host.
Check your odbc.ini for the Host field of the DSN you are using.
Ensure it's resolvable.  Try an IP address instead maybe.

Also, set the variables in the environment and see if your DSN works in
odbctest without PHP in the mix.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: toni baker [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 25, 2001 4:56 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php/Oracle db connection


 I have successfully compiled php with linked iODBC
 driver manager as an Apache shared module.  However
 when trying to connect php to the Oracle database I
 get an error.  The error and the sample connection
 code is below.

 Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host,
 SQL state 08004 in SQLConnect in
 /home/httpd/html/ronsdev/putenv.php on line 9
 can not connect to DSN: data1.tsl.state.tx.us

 ?
 putenv(LD_LIBRARY_PATH=/usr/local/src/odbcsdk/lib);
 putenv(ODBCINSTINI=/usr/local/src/bin/odbcinst.ini);
 putenv(ODBCINI=/usr/local/src/bin/odbc.ini);
 $dsn=data1.tsl.state.tx.us;
 $user=scott;
 $password=tiger;
 $sql=SELECT * FROM scott.emp;
 if($conn_id=odbc_connect($dsn,,)) {
   echo connected to DSN: $dsn;
 if($result=odbc_do($conn_id, $sql)) {
   echo executing '$sql';
   echo Results: ;
   odbc_result_all($result);
   echo freeing result;
   odbc_free_result($result);
 }
 else {
   echo can not execute '$sql';
 }
   echo closing connection $conn_id;
   odbc_close($conn_id);
 }
 else {
   echo can not connect to DSN: $dsn;
 }
 ?

 Can someone help with this?
 Thanks Toni

 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com

 --
 PHP General 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]






-- 
PHP General 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]