PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 5th, 2000, 03:46 AM
Wyvernikus Wyvernikus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Kouvola, Finland
Posts: 11 Wyvernikus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Wyvernikus
Hi! anybody got a sample PHP-script of user autherization, the login script or could help me with it?

I really preciate your help! thanks already.




------------------
-Aarno Villa

Reply With Quote
  #2  
Old January 5th, 2000, 12:33 PM
falcon falcon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: UK
Posts: 50 falcon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 33 sec
Reputation Power: 10
Its a bit of a mess but I hope it helps. It authenticates against a database I think, its been a while since I looked at authorisation stuff. You may need to change a few bits and pieces.

if(!isset($PHP_AUTH_USER)) {
Header("WWW-authenticate: basic realm="$SID"");
Header("HTTP/1.0 401 Unauthorized");
$title="Login Instructions";
echo "<blockquote> n".
"You are not authorised to enter the siten".
"</blockquote> n";
exit;
} else {
if ( $SID != "" )
$SID="@".ereg_replace("@","",$SID);
if (!($conn=ora_logon("$PHP_AUTH_USER$SID",$PHP_AUTH_PW))) {
//if (!($conn=ora_logon("$PHP_AUTH_USER",$PHP_AUTH_PW))) {
Header("WWW-authenticate: basic realm="$SID"");
Header("HTTP/1.0 401 Unauthorized");
$title="Login Instructions";
echo "<blockquote> n".
"You are not authorised to enter the siten".
"</blockquote> n";
exit;
}
}


Falcon

Reply With Quote
  #3  
Old January 10th, 2000, 02:22 AM
Wyvernikus Wyvernikus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Kouvola, Finland
Posts: 11 Wyvernikus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Wyvernikus
Thanks Man! that helped much

I got another problem too, I have a filemanager made with PHP3 and it just doesn´t work right, maybe you could check it and try to fix (or someone else, maybe) it,
I would appreciate that because I need it for my project, If you or someone else is interested of fixing it, I can mail it.
let me know then

Thanks already!

Reply With Quote
  #4  
Old January 10th, 2000, 07:18 AM
Wyvernikus Wyvernikus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Kouvola, Finland
Posts: 11 Wyvernikus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Wyvernikus
it would be fine if the script verifies the password against some password-file, because i can´t use databses such as Mysql

any solutions?



Reply With Quote
  #5  
Old January 10th, 2000, 03:13 PM
kvack kvack is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Posts: 15 kvack User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hehe I have a filemanager too ..
but it's missing some copy and move funktions
I don't know a way to get the directory
structure(on the fly) of my site =)
so now its hidden deep in the basement

Reply With Quote
  #6  
Old January 13th, 2000, 01:29 AM
Wyvernikus Wyvernikus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Kouvola, Finland
Posts: 11 Wyvernikus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Wyvernikus
this is from ClipScripts, made by lacey pevey, and it just doesn´t work, file functions like Edit, Move and others,hopely somebody fixes it. I need that for one of my projects.


Reply With Quote
  #7  
Old January 14th, 2000, 01:55 PM
kvack kvack is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Posts: 15 kvack User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I fixed mine .. by using find.
If you are on a unix-box that
does not run php in safe_mode
it will work .. almost http://firewall.n3.net/download/efman099.zip

Reply With Quote
  #8  
Old January 17th, 2000, 05:29 AM
Wyvernikus Wyvernikus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Kouvola, Finland
Posts: 11 Wyvernikus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Wyvernikus
oki, but that download doesn´t work maybe somebody delete that efman.zip before I downloaded it, damn. btw, how can I do a redirection after the user authetication, Header ("location: $url" ); doesn´t work, because it says that header is already set.
any other ways to redirect it?

Reply With Quote
  #9  
Old January 17th, 2000, 05:50 AM
falcon falcon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: UK
Posts: 50 falcon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 33 sec
Reputation Power: 10
Code:
<?PHP
Authorisation Header
?>

<html>
<head>
<title></title>

<?PHP
if ($something) {
echo "<meta http-equiv=refresh content=0; url=url_1.htm>";
} else {
echo "<meta http-equiv=refresh content=0; url=url_2.htm>";
?>

</head>
<body>
</body>
</html>

I think this is right, I hope it helps.

Falcon

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Problem: User authorization with PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT