hiding db password
| From: | Sallee, Helen | Date: | Thu, 12 Jun 2003 14:31:46 +0000 |
| Subject: | hiding db password | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28574@lists.php.net to get a copy of this message | ||
Hi, I'm new to PHP and need to know how I can completely hide Oracle database password used in
OCILogon call. Since all .php pages can be read by www user, if the userid and password are coded
in the .php page, they anyone can fopen this file and view the contents (right?) - this presents a
security problem. So how can I have a database connection which is secure? Or am I missing
something in here?
The code below is what I have.
<?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
Helen Sallee
VIS Database Administrator