Jump to content

Authentication with session and .htaccess NOT using a database


Recommended Posts

Hi guys

I would like not to use a database for this simple application but would still like to be able to autheticate and identify users of which there will only ever be a handful hence why I feel .htaccess and its .htpassword files could work.

[size=14pt]1. Why cant browsers see the passwords stored in .htpassword though ? [/size]

Also how can I get php to set a session with this user info and then allow that person to see only their files. The files being xml creations by the said people.

[size=14pt]2 Is that possible ? can I set some kind of attribute to a file to identify the owner. I simply want to stop users editing other peoples files.[/size]

I am building xml files which drive a flash front end. The xml files will be created and edited with this very system. I don't want to use a database. I would prefer to show all the files if its not possible to mask the files to those of the owners/creators.



A better way of doing this might be to have a PHP script issue control of these files, and put these XML files in a private directory (as in, a directory that is NOT in your public_html folder). You can have a php file check to see if the session data matches, and then fopen/fwrite/fread the file they need.
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.