dzhax 5 Posted January 14, 2010 Report Share Posted January 14, 2010 I am making a script and i want to host the mysql database login information on my webserver somewhere so no one can hack it, but the script when ran on other servers still need to access it to read the login details.So what I am asking is, is there a way to make it that only scripts can read a file? I dont want people to just browse to the file and read the login information.Or is there a better way to do this.The other reason why I want to keep it on my websserver is if the login details change, then i will not have to send an update to everyone. Quote Link to post Share on other sites
justsomeguy 1,135 Posted January 14, 2010 Report Share Posted January 14, 2010 You could always encrypt the data. There's a lot to say about hosting a publicly-accessible database and also hosting the login credentials, but if you're OK with that then go for it. Quote Link to post Share on other sites
dzhax 5 Posted January 14, 2010 Author Report Share Posted January 14, 2010 You could always encrypt the data. There's a lot to say about hosting a publicly-accessible database and also hosting the login credentials, but if you're OK with that then go for it.what do you mean by there is a lot to say? Quote Link to post Share on other sites
Synook 47 Posted January 14, 2010 Report Share Posted January 14, 2010 As in, there are lots of issues. Quote Link to post Share on other sites
jlhaslip 1 Posted January 15, 2010 Report Share Posted January 15, 2010 place your login credentials in a config file with a php extension.locate the config.php file outside of your web root folder.use an include statement to have the config.php file added to your script. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.