shedokan Posted October 23, 2007 Share Posted October 23, 2007 how can I frotect my database configuration file from hackers and stuff like that? Quote Link to comment https://forums.phpfreaks.com/topic/74507-solved-how-can-i-protect-my-database-configuration-file/ Share on other sites More sharing options...
MadTechie Posted October 23, 2007 Share Posted October 23, 2007 a simple check will be okay, <?php //make sures its .php not .php.inc if(!IN_MySystemName) { die("Access Denied"); } //Config settings (not echoing) $password="Blar"; etc ?> <?php define("IN_MySystemName", true); include "config.php" ?> you could encrypted it as well (if you feel the need, but that becomes a pain If they get FTP access then your stuffed.. the most common problems are things like SQL Injection.. Quote Link to comment https://forums.phpfreaks.com/topic/74507-solved-how-can-i-protect-my-database-configuration-file/#findComment-376553 Share on other sites More sharing options...
shedokan Posted October 23, 2007 Author Share Posted October 23, 2007 it took a while to try it but it worked thanks! Quote Link to comment https://forums.phpfreaks.com/topic/74507-solved-how-can-i-protect-my-database-configuration-file/#findComment-376572 Share on other sites More sharing options...
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.