Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2004, 05:13 PM
Authorized User
 
Join Date: Feb 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mekh Send a message via Yahoo to mekh
Default Securing the Online Site

HI Guys,

I got another problem...

I want to make my online site more secure. I can't understand how we can make the site more secure?

My Problem is:

Whenever I sign in with some ID and than sign out, I can easily go to the same secure page without any restriction. Can anybody help me soon....

Tnank you
Gurung




mekh dev gurung
__________________
MD Gurung
 
Old February 9th, 2004, 06:37 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hey, Gurung,

I had the same problem here.

I don't know what method you are using, but this is how I resolved the problem: I used sessions.

You might want to put the username in $_SESSION['username'] and the password in $_SESSION['password']. This is what I ended up doing. The great thing about sessions is the $_SESSION variable is editable, so to log out, just use unset($_SESSION['username']); and the same with the password.

Remember that pages that use sessions must have session_start(); at the beginning of the page.

HTH,

----------
---Snib---
----------
 
Old February 10th, 2004, 04:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How do you authenticate users when they "log in"? What prevents them from seeing restricted pages without logging in?

The same mechanism you use to protect these pages should work the same regardless whether:
 1) a user hasn't logged in, or
 2) a user logs in and logs out.


Take care,

Nik
http://www.bigaction.org/
 
Old February 10th, 2004, 04:30 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I should add that if you're using sessions to store authentication data, simply destroy the session variables or modify the session such that the user is not logged in.


Take care,

Nik
http://www.bigaction.org/
 
Old February 15th, 2004, 12:18 PM
Authorized User
 
Join Date: Feb 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mekh Send a message via Yahoo to mekh
Default

Hi guys,
I have done that and am about to find anyother loop whole if any...

Thanx guys

mekh

mekh dev gurung
 
Old February 15th, 2004, 12:19 PM
Authorized User
 
Join Date: Feb 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mekh Send a message via Yahoo to mekh
Default

I mean loop holes in my site

mekh dev gurung
 
Old February 16th, 2004, 03:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No problem. Let us know if you discover any snags.


Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
site online - problem Maxxim BOOK: ASP.NET Website Programming Problem-Design-Solution 2 September 4th, 2006 04:10 PM
How to publish my web site online? johnsonlim026 ASP.NET 1.0 and 1.1 Professional 5 October 28th, 2005 05:49 AM
Securing xp_cmdshell Steve_tucker SQL Server 2000 1 December 8th, 2004 06:44 PM
Securing a folder stu9820 ASP.NET 1.0 and 1.1 Basics 2 February 11th, 2004 05:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.