shedokan Posted October 23, 2007 Share Posted October 23, 2007 how can I frotect my database configuration file from hackers and stuff like that? 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.. 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! 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
Archived
This topic is now archived and is closed to further replies.