justuptime.com - monitor your servers & websites

password protection

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
merlin's picture

They have: 410 posts

Joined: Oct 1999

hi there
i have an application, written in perl, using a mysql-db. in short words: it's for searching, adding, changing events through a web-browser.

everything's working fine. i only need to protect the administrating part of the application with a password. since it's only used in an intranet, i don't need a strong protection (1 user/password's enough).

i was thinking 'bout this two ways:
a. implement the protection in my script. i need to handle cookies and stuff...
b. implement the protection through the apache-web-server with the passwd-file.

now:
1. everything (searching & administrating) is in one script, using different parameters. i'm not sure, whether i can protect only some of those parameters with apache? i think i can only use it for a whole directory?

2. can you think of another possibility for this ... challenge?

thank you guys!
m

brady.k's picture

He has: 1,383 posts

Joined: Feb 2002

if you want to protect just a certain page...you can do two things:
1- use PHP to lock the page
or
2- move the page to a different (new) directory and use .htaccess to password protect it

Kyle Brady, President, Intuitive Industries LLC.
http://www.int-ind.com
[EMAIL=brady.k@gmail.com]brady.k@gmail.com[/EMAIL] - [EMAIL=brady.kyle@int-ind.com]brady.kyle@int-ind.com[/EMAIL]

Brian Farkas's picture

They have: 1,015 posts

Joined: Apr 1999

Merlin-
You're correct, apache will only protect a certain file/directory. If the two subroutines are in the same file, you'll need to implement a protection scheme within the script itself.

Brian Farkas
InterSurge Internet- Powerful linux hosting solutions from $7.50
InfoStar Web Design- Custom web site design and development

merlin's picture

They have: 410 posts

Joined: Oct 1999

thank you brian. that's exactly what i wasn't sure about.

well, this takes some more time to do... Cool