x10Hosting Forums

Corporate Free Hosting for the Masses.



Register

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
x10 Sophmore

javajenius's Avatar

Join Date: Jan 2008
Posts: 236
Credits: 249
javajenius will become famous soon enough
Quote  
03-23-2008, 11:14 PM
Php Authentication

Could someone tell me how to protect a site using php and md5 authentication. I've looked through alot of google pages but i am truly confused. Please explain or give me a link that explains php authentication with md5 (or the most secure way to secure a site with php)
Reply With Quote
javajenius is offlineReport Post
x10 Lieutenant

Join Date: Mar 2008
Posts: 359
Credits: 4,059
woiwky is a jewel in the rough
Quote  
03-24-2008, 12:54 AM
Re: Php Authentication

Do you mean HTTP authentication?

If so, this link should answer your questions:

http://www.php.net/features.http-auth

If not, or if that link doesn't help, could you explain more on exactly what it is you want your site to do to authenticate a user? Are you talking about a user registration/login system?

And as for md5, I personally prefer hash('sha256', $str) to it. But to each his own.
__________________
"But you have access to the greatest source of knowledge in the universe."
"Well I do talk to myself sometimes, yes."
Reply With Quote
woiwky is offlineReport Post
// Account Manager //

tnl2k7's Avatar

Join Date: Nov 2007
Posts: 3,215
Credits: 13,708
tnl2k7 is a glorious beacon of light
Location: #offtopic ;)

Quote  
03-24-2008, 05:35 AM
Re: Php Authentication

If you'd like to password protect a folder, this can be done through cPanel. Login as you usually would and somewhere is an option called Leech Protect. Once you've found it it's pretty self explanatory.

If you'd prefer to use a custom script to do it,this might help.
__________________
Reply With Quote
tnl2k7 is offlineReport Post
Lord Of The Keys

LHVWB's Avatar

Join Date: Jan 2008
Posts: 1,368
Credits: 9,224
LHVWB is a jewel in the rough
Location: Australia

Send a message via MSN to LHVWB
Quote  
03-24-2008, 06:30 AM
Re: Php Authentication

It sounds like you don't exactly know what you want to do.

I suggest that you install a forum or content management system using 'fantasico' from cpanel, and see if any of those systems are what you are looking for.
Reply With Quote
LHVWB is offlineReport Post
Subeesh R, X10 Senior Moderator

tittat's Avatar

Join Date: Sep 2007
Posts: 1,721
Credits: 675
tittat is a glorious beacon of light
Location: Kerala,India

Quote  
03-24-2008, 07:17 AM
Re: Php Authentication

Try moving to a CMS(content management system).Iam using e107.Almost every CMS have its own inbuilt authentication system,which will helps you from the hassles of creating your own.
__________________
If you find my post helpfull pls give me the reputation.




non ref id: co.cc


Reply With Quote
tittat is offlineReport Post
x10 Sophmore

javajenius's Avatar

Join Date: Jan 2008
Posts: 236
Credits: 249
javajenius will become famous soon enough
Quote  
03-25-2008, 01:05 AM
Re: Php Authentication

Quote:
Do you mean HTTP authentication?
No, thats insecure.

Quote:
If you'd like to password protect a folder
Still http basic auth.

Quote:
forum or content management system
I need to build my own for the control panel =(.

Is no one good enough at php to help me secure some folders...
Reply With Quote
javajenius is offlineReport Post
x10 Lieutenant

Join Date: Mar 2008
Posts: 359
Credits: 4,059
woiwky is a jewel in the rough
Quote  
03-25-2008, 02:36 AM
Re: Php Authentication

What exactly do you mean by "secure folders"? Furthermore, what exactly is it that you plan to store in the folders? It sounds to me that you're looking in the wrong place for what you want. PHP is just a scripting language, not a server.
__________________
"But you have access to the greatest source of knowledge in the universe."
"Well I do talk to myself sometimes, yes."
Reply With Quote
woiwky is offlineReport Post
x10 Sophmore

konekt's Avatar

Join Date: Mar 2008
Posts: 100
Credits: 2,696
konekt has a spectacular aura about
Quote  
03-25-2008, 05:52 AM
Re: Php Authentication

md5($var);
crypt($var, CRYPT_MD5);

...am I missing something?

Last edited by konekt; 03-25-2008 at 05:53 AM.
Reply With Quote
konekt is offlineReport Post
Developer

Jake's Avatar

Join Date: Apr 2005
Posts: 1,692
Credits: 11,475
Jake has a reputation beyond repute
Location: Minnesota

Quote  
03-25-2008, 06:04 PM
Re: Php Authentication

normally you'd just store the password encrypted like $enc_pass = sha1($pass), in order to recognize that a person has entered the correct password you could just have it test the password the user supplies with the encryptions on it to see if it matches the encrypted one stored in a db or file.

you could always make your own hash... if you felt the need for it.
__________________

Last edited by Jake; 03-25-2008 at 06:07 PM.
Reply With Quote
Jake is offlineReport Post
x10 Sophmore

konekt's Avatar

Join Date: Mar 2008
Posts: 100
Credits: 2,696
konekt has a spectacular aura about
Quote  
03-25-2008, 06:41 PM
Re: Php Authentication

Quote:
Originally Posted by Jake View Post
normally you'd just store the password encrypted like $enc_pass = sha1($pass), in order to recognize that a person has entered the correct password you could just have it test the password the user supplies with the encryptions on it to see if it matches the encrypted one stored in a db or file.

you could always make your own hash... if you felt the need for it.
I always do multiple encryptions using varied encryption methods (mainly md5 and blowfish). I find using encryptions as hashes for further encryption is really effective... I usually do about 5-8 encryptions, with each encryption lending to the hash of the other. Yes... I am quite paranoid
Reply With Quote
konekt is offlineReport Post
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem compiling PHP zip extension onto a Mac that has MAMP Pro DarkAngelBGE Free Hosting 3 03-10-2008 01:22 PM
Unstand PHP? o0slowpaul0o Tutorials 8 01-07-2008 10:16 PM
Sigo con problemas con phpbb2 reciecho Soporte 7 10-20-2007 07:28 PM
"PHP Startup: Invalid Library" - Interesting error javaguy78 Free Hosting 5 03-27-2007 03:33 PM


All times are GMT -5. The time now is 01:12 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

The eBay Song | Mortgage Calculator | Car Finance | Books | Project cars for sale