[thelist] PHP/Oracle Connect Problems....

Kristy Frey kristenannfrey at yahoo.com
Thu Mar 14 14:51:01 CST 2002


If your computer has the oracle client installed (I assume it does if your using SQL+), look at
the TNSNAMES.ORA file
and try this php code:

<?
$server="....  entry in the TNSNAMES.ORA file   ....";
$login="your login";
$pwd="your password";
$connection=@OCILogon("$login","$pwd","$server");
?>

> Chris Ditty wrote:
> > Does anyone have a really simple connection script for connecting to
> > oracle?  I had one a few years ago (literally) and have lost it.  I now
> > need to try and connect again and can't.  Below is what I have tried.
> >
> > putenv("ORACLE_HOME=C:\ORANT");
> > putenv("TNS_ADMIN=C:\ORANT\NET80\ADMIN"); putenv("ORACLE_SID=mlocr");
> > $conn=ora_logon("mlocr_user at mlocr","password");
> >
> > This is the error that I get.
> > Warning: Oracle: Connection Failed: ORA-12154: TNS:could not resolve
> > service name in c:\program files\web_dev\apache\htdocs\mlocr\connect.php on
> > line 6
> >
> > This is strange as I can connect via SQL+ with the same info.
> >
> > I have spent the last hour looking through online archives and haven't had
> > any luck.


=====
----------------------------------------------------------
I apologize for the ads/links below - Yahoo put them there.
That's what I get for using free mail
----------------------------------------------------------

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/



More information about the thelist mailing list