> > <?php
> > putenv("TWO_TASK=ORCL2");
> > putenv("ORACLE_HOME=/u01/home/oracle/product/9.2.0");
> > $conn = OCILogon("USER1","USER1PASS");
> > $query = OCIParse($conn,"select * from state");
> > OCIExecute($query);
> > ?>
> >
> > Thank you
>
> Use an include file buried below your site root with
>
> $user=USER1;
> $pass=USER1PASS;
>
> Then you should be able to do:
>
> Include"/path/to/pass.inc.php";
> <snip>
> $conn = OCILogon("$user","$pass");
>
> Which is more secure.

Be careful when you say something is "more secure". From a file system
perspective, this method is no different from putting the username/password
in the regular PHP file. From a web server perspective, though, this is
"safer" because if the web server ever broke and started serving PHP pages
as plain text (been there, done that), then at least no one can get to your
include file through your web server.

---John Holmes...


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

Reply via email to