MY QUESTION : what do I have to put in each directory ?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Apr 30, 2006, 11:54:25 pm »
Hello,
Its not a question of protecting directories, the only thing is to have the right pathes in your scripts.
start with using all files in this folder:
your_root/classes/access_user/
and study these settings (db_config.php):
Code:
define("CLASS_PATH", dirname($_SERVER['PHP_SELF'])."/"); // the location where the class is executed $sec_path = "/classes/access_user/"; // a second location where the scripts should be define("APPLICATION_PATH", $sec_path);
... ... ...
// variables (locations) standard pages (combine the pathes from the top or use your own) define("LOGIN_PAGE", CLASS_PATH."login.php"); define("START_PAGE", "/classes/access_user/example.php"); define("ACTIVE_PASS_PAGE", APPLICATION_PATH."activate_password.php"); define("DENY_ACCESS_PAGE", APPLICATION_PATH."deny_access.php"); define("ADMIN_PAGE", APPLICATION_PATH."admin_user.php");
MY QUESTIONS : - Is this organisation good to protect several files in diferent directories ? - in case of such configuration, what should contain the db_config.php ?
Thans for your help !
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: May 01, 2006, 11:47:11 am »
try this:
Code:
<?php define("CLASS_PATH", dirname($_SERVER['PHP_SELF'])."/"); // the location where the class is executed $sec_path = "/general_authentication_directory/"; // a second location where the scripts should be define("APPLICATION_PATH", $sec_path); ..... ....
// variables (locations) standard pages (combine the pathes from the top or use your own) define("LOGIN_PAGE", APPLICATION_PATH."login.php"); define("START_PAGE", APPLICATION_PATH."example.php"); define("ACTIVE_PASS_PAGE", APPLICATION_PATH."activate_password.php"); define("DENY_ACCESS_PAGE", APPLICATION_PATH."deny_access.php"); define("ADMIN_PAGE", APPLICATION_PATH."admin_user.php");
?>
of course you have to change pathes at the top of each file according this structure.