[SOLVED] Authorizer v1.0 - Login and Error Problems

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
45thronin
Forum Newbie
Posts: 4
Joined: Thu Jul 08, 2004 10:39 am

Authorizer v1.0 - Login and Error Problems

Post by 45thronin »

Hi, I found a free but older PHP Login Script. I am new to PHP and don't know how to adjust the script to work for me. I was wondering if someone could help me.

The name of the script is Authorizer v1.0 (http://www.phpscripts-fr.net/scripts/sc ... tification) It's in English.

Basically the problem I'm having is when you initially install the script and try to login with the default login and password, you get this error:

- - - -
Warning: setcookie() expects parameter 3 to be long, string given in /home/richar4/public_html/rl/zuk/auth_login.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at /home/richar4/public_html/rl/zuk/auth_login.php:5) in /home/richar4/public_html/rl/zuk/auth_login.php on line 7
- - - -

I figured out that if you modify the auth_login.php file from:

$exp = gmdate ("M d Y H:i:s", time()-5000);
setcookie("AUTHORIZER",$username.":".md5($username.$userpass),$exp." GMT");

To this:

setcookie("AUTHORIZER",$username.":".md5($username.$userpass)." GMT");

There is no longer an error. However, nothing happens. When you enter the default login and password again, the page just refreshes.

Would someone please be so kind as to help me get this script running. I would greatly appreciate it.

Thank you!!!!

45thronin
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

The problem isn't the setcookie it's the $exp. $exp should be a unix timestamp not a formatted datetime.

Try...

Code: Select all

$exp = time()-5000; // this might actually delete the cookie
setcookie("AUTHORIZER",$username.":".md5($username.$userpass),$exp);
or this make more sense ...

Code: Select all

$exp = time()+3600; // this cookie expires in one hour (maybe)
setcookie("AUTHORIZER",$username.":".md5($username.$userpass),$exp);
45thronin
Forum Newbie
Posts: 4
Joined: Thu Jul 08, 2004 10:39 am

Thank you for the reply

Post by 45thronin »

Thanks for the reply Buddha443556. I do so appreciate the help.

I applied the changes to the auth_login.php file as you suggested, however when I go to login still nothing happens. The login screen just refreshes. Do you think there might be something wrong with the users.inc.php file regarding the password login?

45thronin
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

I applied the changes to the auth_login.php file as you suggested, however when I go to login still nothing happens. The login screen just refreshes. Do you think there might be something wrong with the users.inc.php file regarding the password login?
The defualt login is admin:admin (that's is case-sensitive on both) and the md5 (f6fdffe48c908deb0f4c3bd36c032e72) in users.inc.php seem to match that.

The login screen may seem to refresh because it's sending you back to the http_referer page. How did you get to the login in page? You could be logged in?

Have you setup a test page yet?

Code: Select all

<?php 
	include "auth.inc.php";
	verifyAccess(0);
?>
TEST SUCESSFUL
45thronin
Forum Newbie
Posts: 4
Joined: Thu Jul 08, 2004 10:39 am

No Test Yet

Post by 45thronin »

Hi Buddha443556,

I haven't tested it as of yet, simply because the script calls for me to change the admin login which is what I was trying to do. Also to add/edit accounts in the accounts area. However, I can't seem to get to that area because I can't log into the admin area. Something tells me it's something really simple that I'm not seeing. Have you gotten a chance to download the full script?

Again, thanks for the help Buddha443556!!

45thronin
45thronin
Forum Newbie
Posts: 4
Joined: Thu Jul 08, 2004 10:39 am

Thanks Buddha443556!! I think I figured it out!

Post by 45thronin »

I was thinking about what you said and tried a test with it. It worked! Thank you so much for your suggestion!! You are the greatest!!! Cheers to you my friend!!! May flowers and candy brighten your day!!

Thanks again!!

45thronin
Post Reply