473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

single connection per user on platform

20
Hello all!

I have asked the question at the apache forum but I have gotten no replies so I need to ask someone here in case you know how I can solve the following problem:

I am working on a platform and there is a restricted area when users need to login. The issue is that multiple users can login with the same username/password at the same time which I don't like. I want when a user logs in no other person to be able to log in the system with the same username/password. Is there a way I can implement that on the server? I have tried to implement the operation with php but it does not work right. I would highly appreciate any help.

Thank you
Theoni
Jul 11 '08 #1
2 1371
pbmods
5,821 Expert 4TB
Heya, Theoni.

You need to be able to uniquely identify each computer. My recommendation is to use a cookie.

Unfortunately, session cookies are rather unreliable, and IP addresses are not particularly unique.

You'll want to set a cookie when the User logs in with a unique identifier (sha1(microtime()) does nicely). The next time that User tries to log in, check his Username, password AND unique ID to see if he's allowed to login from that machine.

Make sure you implement a timeout so that the User isn't stuck on one machine until he logs out!
Jul 11 '08 #2
theoni
20
Heya, Theoni.

You need to be able to uniquely identify each computer. My recommendation is to use a cookie.

Unfortunately, session cookies are rather unreliable, and IP addresses are not particularly unique.

You'll want to set a cookie when the User logs in with a unique identifier (sha1(microtime()) does nicely). The next time that User tries to log in, check his Username, password AND unique ID to see if he's allowed to login from that machine.

Make sure you implement a timeout so that the User isn't stuck on one machine until he logs out!

I did try such an implementation but I am not sure that session cookies cover all cases for users this is why I was looking for a more elaborate solution that takes care of user connection on the server, without interference. I will look into your suggestion better if I don't come up with anything better.

thank you for the answer pbmods
theoni
Jul 13 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
2
by: meng | last post by:
is it possible to use a single connection object shared by several tasks where each task is handled by a thread? these tasks call stored procedures that return record sets, no editing, update or...
2
by: DMS | last post by:
am new to ASP.NET and IIS web applications, but not to SQL databases. I can successfully build Windows apps using Visual Studio that use ADO. However, for Web Forms, I created data connection and...
4
by: DG | last post by:
Hi, Can anyone advise how to execute multiple statements in a single query batch. For example- update customers set customer_name = 'Smith' where customer_name = 'Smyth'; select * from...
0
by: Twan Kennis | last post by:
Hello! I do have the following problem: I've developed a Windows application which communicates with a DB2-database on the iSeries platform using an ODBC-connection string. This...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
5
by: velu5 | last post by:
Hello , Is it possible/recommended to do SQL server instance backups in Single user mode ? Thanks in advance, atv
8
by: theoni | last post by:
Hello all! I am working on a platform and there is a restricted area when users need to login. The issue is that multiple users can login with the same username/password at the same time which I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.