FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » login script using file, not mysql
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: login script using file, not mysql [message #171609 is a reply to message #171603] Tue, 11 January 2011 23:50 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On 11/01/11 21:17, Luuk wrote:
> On 11-01-11 22:04, Denis McMahon wrote:
>> You can write a password / access control system in php that uses a
>> plain text file to store passwords, but there are issues with doing so,
>> one of which is the need to allow concurrent write access to the file if
>> two users decide to update their passwords at once.

> if 'write access' is needed to the file

>> Using a suitable database avoids such issues.

> than 'write access' is also needed for the database

> so, using a database, and not a file, dose not avoid such issues....

Yes it does, because a database is designed to handle record locking and
concurrent accesses.

Added to this, in a database, to update a single password field in a
table you don't need to read in, update, and write out a whole file, and
as long as two people don't try and update the same record in a database
at once, concurrency and locking should not be an issue.

If two people are trying to update the same password at once, something
weird is happening.

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: using same variable twice on same page
Next Topic: Re: instructor's solutions manual for Manufacturing Processes for Engineering Materials (5th Ed. Kalpakjian & Smith)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 07:31:11 GMT 2024

Total time taken to generate the page: 0.15693 seconds