Hi There,
I'm setting up a large company and would like to keep connection usernames and passwords secret from the devteam. Here's the dilemma I'm facing:
suppose I have my developers put the following at the top of their script:
// includes the file and calls the connect function
include_once("/home/site/restricted/connect.php");
connect();
They can connect to the database yet never know what the username and password are (cause they're stored in the connect() function and are therefore not global).
However, if I user knows the path /home/site/restricted.php, he or she can just as easily do this:
$hahaIgotyou = implode('',file('/home/site/restricted.php'));
echo $hahaIgotyou;
Is there any way around this? I've thought of having PHP call a php executable file and have an object, apache aliases, and haven't thought of a way yet.
I will honestly pay $50.00 to the first person who can give me a solution to this and show me why it works security-wise.
Sincerely,
Sam Fullman
Compass Point Media