Re: Help connecting with oracle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Sergio Barreira" <webmaster_dgr@entrerios.gov.ar> a écrit dans le message
news: F1D3A93E0B1DD411BD3D00A0C9D49404D7C6ED@MAIL_SERVER...
> Hi:
>       I have a Oracle 7.3.3 on Unix, but in my computer (client) Windows
> 2000 i have a php source code that try to connect with this database.
>       I test with TNSPING and SQLPLUS commands line, and connect with both
> susseffuly, but when i try to connect with php can't.
>       I have a Apache server with php 4.2.2
>
>       i'm trying the follow code:
>
>  <?
> if ($conn=Ora_Logon(" webmaster@PROD <mailto:webmaster@PROD> ",
> "webmaster")) {
>         echo "<B>SUCCESS ! Connected to database<B>\n";
> } else {
>         echo "<B>Failed :-( Could not connect to database<B>\n";
> }
> Ora_Logoff($conn);
>
> ?>
>
> And the error is:
>
> Warning: Oracle: Connection Failed: in C:\FoxServ\www\conectar.php on line
2
> Failed :-( Could not connect to database
> Warning: ora_logoff(): supplied argument is not a valid Oracle-Connection
> resource in C:\FoxServ\www\conectar.php on line 7

Have you tried the newer oci8 extension, instead of the oracle one ? you
need the oracle client installed onto you php server (I think it is already
there, as you said your SQLPLUS is working correctly, but I'm not an oracle
guru ;-( ), and uncomment php_oci8.dll instead of php_oracle. After that,
you would be able to connect to your remote oracle db using ocilogon instead
of ora_logon.
Hope this helps.
Philippe

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux