mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:46

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: user self-registration
PostPosted: 15 Mar 2005, 00:59 
installed the code and it works great!

meanwhile, i would like to create a section for users to register themselves, i.e. a form where they fill in their name, company, address, email, etc, and choose their own username & password to login.

i don't know much php scripting at all, could you help?

thanks!


Report this post
Top
  
Reply with quote  
PostPosted: 15 Mar 2005, 01:02 
whoops, forgot something else -

you mentioned that the code is ideal for <100 users. what would happen if the number exceeds 100? would this 'limitation' be a problem if i want to let users self-register?

thanks.

PS. intend to do this on a text file; don't have a MySQL database.


Report this post
Top
  
Reply with quote  
 Post subject: More than 100 users...
PostPosted: 16 Mar 2005, 07:55 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
exchequer:

> you mentioned that the code is ideal
> for <100 users. what would happen
> if the number exceeds 100? would this
> 'limitation' be a problem if i want to
> let users self-register?
> PS. intend to do this on a text file;
> don't have a MySQL database.

Hi. The one hundred users limit is an empirical limit, and it is not absolute.

The problem is this: parsing a text file in PHP is CPU intensive. The text file is really checked only once (on login), after that, all login information is kept in memory (in session vars) in the server.

If you have 1000 users, when the first user in the list try to login, the script will find his login information quickly. But if the user is the last one, the script will have to parse the whole file to find her information.

How much time it will take? Maybe 10 milliseconds, maybe 5 seconds. That depends on the server capacity and load. I only tested it on a very loaded server (a Linux Slackware, PIII-500MHz server) with 100 users, and the performance was good enough.

So, will it crash your server? No. Will it make your users to wait minutes to login? No. Will your hosting provider tell you that your script is loading the server too much? Maybe. But I don't think so; as I said, the file is only parsed when logging in.


So, maybe I was too conservative when stating "100 users". After all, my development server is slower than most running servers today. :)


Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: 31 Mar 2005, 07:01 
thanks loads for the clarification on the 'more than 100 users'. ;)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group