Jump to content

[SOLVED] how can I protect my database configuration file?


shedokan

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.