I need to store some variables for accessing my SQL database. I don't know where a good place is to store them to be as secure as possible.
Thanks.
Where and how do you store SQL variables on your website?
Moderator: General Moderators
You mean the name & pass used to connect to the mysql server?
Put a connection script in a folder protected by .htaccess "deny from all" and include it wherever it's needed.
It could be a good idea to create different mysql users with different privileges granting ordinary site visitors fewer privileges than admin users - just what they need and no more.
Put a connection script in a folder protected by .htaccess "deny from all" and include it wherever it's needed.
It could be a good idea to create different mysql users with different privileges granting ordinary site visitors fewer privileges than admin users - just what they need and no more.
So do you like change the permissions on the fly? Like at the top of the file? Does that make it so that people can't see it or what?Oromian wrote:That's hyper secure, i just leave the variables in the regular directory but change the chmod() permissions.