Re: [PHP-DB] problems connecting to remote oracle database
On Tue, Jul 03, 2001 at 09:43:52AM -0400, Brian S. Dunworth wrote: > Hi Phil... > >Since you have the server name (vs. the IP address) in the HOST= verb, > make sure you have an entry in /etc/hosts for a server called 'staging' yes, that's there, otherwise, I wouldnt be able to use sqlplus with the name in the same fashion, from the same client machine. -- PHP Database 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-DB] problems connecting to remote oracle database
Hi Phil... Since you have the server name (vs. the IP address) in the HOST= verb, make sure you have an entry in /etc/hosts for a server called 'staging' eg: $ cat hosts 127.0.0.1 localhost 219.70.73.2staging $ ...obviously, you'd want to put the actual IP address of your 'staging' server in there, not the one I made up. :) - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 <[EMAIL PROTECTED]> - -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 7:52 PM To: [EMAIL PROTECTED] Subject:Re: [PHP-DB] problems connecting to remote oracle database a little more info... I've just tried a few public oracle-sql tools. Seems to have the same problem. I can connect just fine to the database using sqlplus. But when I try the hand-compiled tools, linked against libclntsh.so, it doenst properly authenticate to the remote system. Hey... $ORACLE_HOME/bin/sqlplus isnt linked against libclntsh.so, funnily enough. any ideas? Some special magic I need to put in tnsnames.ora, thta I've othrewise left out? sample, that works fine with sqlplus; TEST2.STAGING.our.com = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = staging)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = test2.staging.our.com) (SID = test2) ) ) -- PHP Database 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 Database 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-DB] problems connecting to remote oracle database
a little more info... I've just tried a few public oracle-sql tools. Seems to have the same problem. I can connect just fine to the database using sqlplus. But when I try the hand-compiled tools, linked against libclntsh.so, it doenst properly authenticate to the remote system. Hey... $ORACLE_HOME/bin/sqlplus isnt linked against libclntsh.so, funnily enough. any ideas? Some special magic I need to put in tnsnames.ora, thta I've othrewise left out? sample, that works fine with sqlplus; TEST2.STAGING.our.com = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = staging)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = test2.staging.our.com) (SID = test2) ) ) -- PHP Database 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-DB] problems connecting to remote oracle database
On Mon, Jul 02, 2001 at 02:07:38PM -0400, Brian S. Dunworth wrote: > Hi Phil, > >Make sure that the web user (usually 'nobody' on an Apache installation) > has access to the $ORA_HOME/bin directory and permissions to execute the > binaries within. Also, be sure that ORA_HOME and ORACLE_SID are set in the > 'nobody' user environment... why should I have to set the ORACLE_SID env var, if it is specified in tnsnames.ora? I dont have to set ORACLE_SID if I use sqlplus from the command line (as nobody, even) I can log in just fine with sqlplus user/pw@machinename So I'm figuring ocilogon("user","pw","machinename") should work just dandy. Is ocilogon broken in that way? I would think not, since it should be using the oracle libraries to automatically read tnsnames.ora and set that kind of stuff automatically. -- PHP Database 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-DB] problems connecting to remote oracle database
Hi Phil, Make sure that the web user (usually 'nobody' on an Apache installation) has access to the $ORA_HOME/bin directory and permissions to execute the binaries within. Also, be sure that ORA_HOME and ORACLE_SID are set in the 'nobody' user environment... - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 <[EMAIL PROTECTED]> - -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Saturday, June 30, 2001 12:39 PM To: [EMAIL PROTECTED] Subject:[PHP-DB] problems connecting to remote oracle database Hi folks, I'm having difficulties getting php4 to connect to a remote oracle database. I have an entry in tnsnames.ora, along the lines of shorthostname = (etc, etc) and I can use "sqlplus user/name@shorthostname" to connect just fine, as a regular user. Even without ORACLE_SID set, since I have it set in tnsnames.ora for that entry But when I try ocilogin("user","name","shorthostname"); on a php page, I get a printout of oracle error 01017: authentication failed. The listener log on that oracle machine confirms that I am actually attempting to connect. But no details on what's going wrong. Any suggestions? -- PHP Database 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 Database 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-DB] problems connecting to remote oracle database
On Mon, Jul 02, 2001 at 10:53:55AM -0400, Anthony Carlos wrote: > Phil, > > Perhaps I'm being nit-picky, but shouldn't it be OCILogon("$user", > "$PASSWORD", "$connect_string"); ? I have tried both $user="realuser"; $password="actualpassword"; $dbname="oraclename" ocilogon($user,$password,$dbname); AND simply calling ocilogon "hardcoded", with the actual values directly in the quotes. both give the same error. > > From: [EMAIL PROTECTED] > > Date: Sat, 30 Jun 2001 09:39:11 -0700 > > To: [EMAIL PROTECTED] > > Subject: [PHP-DB] problems connecting to remote oracle database > > > > Hi folks, > > ... I can use "sqlplus user/name@shorthostname" to connect just fine, as > > a regular user. > > But when I try > > ocilogin("user","name","shorthostname"); > > > > on a php page, I get a printout of oracle error 01017: authentication > > failed. -- PHP Database 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-DB] problems connecting to remote oracle database
Phil, Perhaps I'm being nit-picky, but shouldn't it be OCILogon("$user", "$PASSWORD", "$connect_string"); ? Anthony > From: [EMAIL PROTECTED] > Date: Sat, 30 Jun 2001 09:39:11 -0700 > To: [EMAIL PROTECTED] > Subject: [PHP-DB] problems connecting to remote oracle database > > Hi folks, > > I'm having difficulties getting php4 to connect to a remote oracle > database. > > I have an entry in tnsnames.ora, along the lines of > > shorthostname = (etc, etc) > > and I can use "sqlplus user/name@shorthostname" to connect just fine, as > a regular user. Even without ORACLE_SID set, since I have it set in > tnsnames.ora for that entry > > But when I try > ocilogin("user","name","shorthostname"); > > on a php page, I get a printout of oracle error 01017: authentication > failed. > The listener log on that oracle machine confirms that I am actually > attempting to connect. But no details on what's going wrong. > > Any suggestions? > > -- > PHP Database 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 Database 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-DB] problems connecting to remote oracle database
>From Oracle manual : ORA-01017: invalid username/password; logon denied Cause: An invalid username or password was entered in an attempt to log on to Oracle. The username and password must be the same as was specified in a GRANT CONNECT statement. If the username and password are entered together, the format is: username/password. Action: Enter a valid username and password combination in the correct format. -Stathis. [EMAIL PROTECTED] wrote: > > Hi folks, > > I'm having difficulties getting php4 to connect to a remote oracle > database. > > I have an entry in tnsnames.ora, along the lines of > > shorthostname = (etc, etc) > > and I can use "sqlplus user/name@shorthostname" to connect just fine, as > a regular user. Even without ORACLE_SID set, since I have it set in > tnsnames.ora for that entry > > But when I try > ocilogin("user","name","shorthostname"); > > on a php page, I get a printout of oracle error 01017: authentication > failed. > The listener log on that oracle machine confirms that I am actually > attempting to connect. But no details on what's going wrong. > > Any suggestions? -- PHP Database 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-DB] problems connecting to remote oracle database
Hi folks, I'm having difficulties getting php4 to connect to a remote oracle database. I have an entry in tnsnames.ora, along the lines of shorthostname = (etc, etc) and I can use "sqlplus user/name@shorthostname" to connect just fine, as a regular user. Even without ORACLE_SID set, since I have it set in tnsnames.ora for that entry But when I try ocilogin("user","name","shorthostname"); on a php page, I get a printout of oracle error 01017: authentication failed. The listener log on that oracle machine confirms that I am actually attempting to connect. But no details on what's going wrong. Any suggestions? -- PHP Database 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]