Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP auction requires readable passwords file

Status
Not open for further replies.

leehinkleman

Programmer
Feb 14, 2002
83
NZ
A free PHP auction script, using MySQL, requires the username and password for the database to be readable from a settings.php file.
The username and password combination are the same for the domain, and for the database.
Does that apparent exposure look like a potential problem and, if so, how can it be made more secure?
Thanks for your help.
 
Put the username and password info in a separate php file called for example connect.php
<?php
$dbname=&quot;databasename&quot;
$dbserv=&quot;server&quot;;
$uname=&quot;username&quot;;
$upass=&quot;userpassword&quot;;
?>

in the scripts where db connection is needed put the following

require(&quot;connect.php&quot;);

It's not a lie if you believe it!

| |
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top