944,068 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 543
  • PHP RSS
Oct 20th, 2009
0

Safely Admin Panel

Expand Post »
I have administration part of my web site. But it will have only one user who will login in the page.My question what is more safely from attacks ? The user and password to be stored in mysql database or directly in .php file ?
Last edited by ultras1; Oct 20th, 2009 at 7:27 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ultras1 is offline Offline
19 posts
since Sep 2009
Oct 20th, 2009
0
Re: Safely Admin Panel
A database would be more secure.

If your PHP compiler stopped working for any reason, your PHP code yould be displayed as plain text, meaning that your password would be visible.

However, if you have it in a database and the compiler stops working, then the user will not see the Admin password. Although they would see the database connection information.

The best way would be in a database, and setup access hosts in your database to prevent anyone other than Localhost making a connection (Also, make sure your database user password is not the same as any other password you use, a string or random numbers/letters/symbols for example)
Reputation Points: 96
Solved Threads: 124
Master Poster
Will Gresham is offline Offline
728 posts
since May 2008
Oct 21st, 2009
0
Re: Safely Admin Panel
encrypting the password before storing it to the db is also a good security measure.
Reputation Points: 29
Solved Threads: 76
Practically a Master Poster
network18 is offline Offline
616 posts
since Sep 2009
Oct 21st, 2009
0
Re: Safely Admin Panel
Please Store your all Username and Password in Database with Encrypt of Password Field. This is Most Security Option in admin Panel.
Reputation Points: 18
Solved Threads: 17
Junior Poster
hemgoyal_1990 is offline Offline
175 posts
since Aug 2007
Oct 21st, 2009
0
Re: Safely Admin Panel
Ok, thanks to all
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ultras1 is offline Offline
19 posts
since Sep 2009
Oct 21st, 2009
0
Re: Safely Admin Panel
One more question. What is better solution for login users. Cookies or sessions?
In cookies I put the time of their duration, but what about sessions, how long is their duration?
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ultras1 is offline Offline
19 posts
since Sep 2009
Oct 21st, 2009
0
Re: Safely Admin Panel
the best solution is session..
because after a specified time the use automatically logged out so session is best option for security.
Reputation Points: 18
Solved Threads: 17
Junior Poster
hemgoyal_1990 is offline Offline
175 posts
since Aug 2007
Oct 21st, 2009
0
Re: Safely Admin Panel
the best solution is session..
because after a specified time the use automatically logged out so session is best option for security.
I am going to disagree with your reasons for using sessions over cookies, although Sessions are more secure in themselves:

This can also be done with Cookies, you can set the time they expire.
I assume you meant that they expire when the browser closes, but an auto timeout is not really required in most situations so can't really be used as the main point for using sessions..

The main advantage of sessions is that the session data is stored on the server, not on the client PC (Cookies store the data on the Client).
The only thing that is stored on the client is the session ID.
Reputation Points: 96
Solved Threads: 124
Master Poster
Will Gresham is offline Offline
728 posts
since May 2008
Oct 21st, 2009
0
Re: Safely Admin Panel
I use this in my projects:
http://www.evolt.org/node/60384
Reputation Points: 7
Solved Threads: 14
Junior Poster
smartness is offline Offline
103 posts
since Aug 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: hosting site on personal web host....!!
Next Thread in PHP Forum Timeline: Connection failure





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC