Which method would you recommend?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply

Storage of Usernames & Passwords for simple dev area login..

Poll ended at Fri May 24, 2002 6:35 am

SQL
8
100%
XML
0
No votes
Text Files
0
No votes
Array
0
No votes
Other (please leave message)
0
No votes
 
Total votes: 8

leenoble_uk
Forum Contributor
Posts: 108
Joined: Fri May 03, 2002 10:33 am
Location: Cheshire
Contact:

Which method would you recommend?

Post by leenoble_uk »

I want to create a login area for our development server. Just a simple 2 line form for username and password. When submitted the user will be taken to a page with a list of all versions of their site.
I've already written a script to list all the directories in a single directory and then print out the version information next to each so I'm not bothered about this side of things, it's just how the login will work.
I know how I can do it with MySQL, and this IS an option as MySQL is running on the server anyway and I would not have any problem putting that together but I'd like to know what alternatives there are and what would you recommend. I think MySQL, although simple enough would be overkill for something so simple and have been thinking of trying out XML (I haven't done any XML with PHP yet but I like a challenge) or using just an array. Or even just a text file, I've done some manipulation of files and directories before and am confident I could get something working with this method. Ideally I want all the information to be nicely contained in the one directory. One file for the login page and a text or XML file for the usernames and passwords. I'm not hugely bothered about the security implications of leaving usernames and passwords on the server as all they will do is get the user to their page. All we want is that each client cannot see a list of all the other clients, and I really doubt that anyone is going to go snooping about on our dev server anyway.
Cheers
Lee
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Make sure whatever you choose, that the choice will be able to grow with you.

If you store the data in an array, it shouldn't be difficult to move to MySQL if maintaining it becomes more difficult.
User avatar
cwcollins
Forum Commoner
Posts: 79
Joined: Thu May 16, 2002 3:51 pm
Location: Milwaukee, WI, USA

Post by cwcollins »

If you do store it in a text file, or as xml, you should be able to store it "above" the document root. this will decrease/remove the possibility of a user finding the password file.

c.w.collins
Post Reply