14, February 2012

directories organisation - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: directories organisation
« previous next »
Pages: [1] Print

Author Topic: directories organisation  (Read 1476 times)
Chicken-run Manager
*
Posts: 9
62 credits
Members referred : 0


« on: Apr 30, 2006, 11:49:58 pm »

Hello,

I'm a new Access_user_class that I find to be a very nice tool.

I have many problem with the directories and sub directories organisation.

/home/mydomain
- www
--my_directory_to_protect
--classes
---access_user

MY QUESTION :
what do I have to put in each directory ?
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
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");


Last blog : A new Wordpress theme for our blog
Chicken-run Manager
*
Posts: 9
62 credits
Members referred : 0


« Reply #2 on: May 01, 2006, 07:54:53 am »

Hello, Olaf,

my understanding of this php script is not complete... Embarrassed
You are rigth : there are no directories to protect but files

I'm trying the solution you proposed and come back later.
Thanks for your help.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: May 01, 2006, 08:27:38 am »

HI,

1. protect your directory with .htaccess
2. create a php file to open files (check: http://www.finalwebsites.com/snippets.php?id=4)
3. protect this file with access_user


Last blog : A new Wordpress theme for our blog
Chicken-run Manager
*
Posts: 9
62 credits
Members referred : 0


« Reply #4 on: May 01, 2006, 10:54:43 am »

Hello Olaf,

this morning, I have many problems with the email system in my hosting, so I'm not able to verificate my work.

In any case, I can't understand the way to configure the diferent files and directories.  Embarrassed

This is my configuration :

/home/mydomain/www

|+| the_directory_that_contains_files_to_protect
--example.php
--what_else_file_to_put_here.php?

|+| classes
--|+| access_user
------access_user_class.php
------db_config.php

|+| general_authentication_directory
--login.php
--forgot_password.php
--register.php
--update_user.php
--update_user_profile.php
--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: Male
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.


Last blog : A new Wordpress theme for our blog
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2385
Tags : php directories hosting email Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: directories organisation
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 07:06:45 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.