Firefox PHP

S.O.S. - Using Phorum Auth

Posted by markgreene 
All files from this thread

File Name File Size   Posted by Date  
side_bar.php 2.6 KB open | download markgreene 10/22/2005 Read message
quick_auth.php 1.4 KB open | download markgreene 10/22/2005 Read message
S.O.S. - Using Phorum Auth
October 22, 2005 03:50PM
I REALLY love Phorum and its community. I am trying to start a small website where I will be able to code web apps as it grows. Of course I would like to use Phorums Auth system instead of coding my own, that way users will only have to login once, and when I make another web app I will just add a table or two to the phorum db. My problem is this. I have a sidebar on the left of the screen where the user types thier username and password, and the form action is to submit the two fields to Phorums login.php . The problem is the sidebar is suppose to include() the quick_auth.php file that I found here, [phorum.org], to determine if the user is logged in or not. I am running into a lot of problems. When I login from the homepage, even though I have a hidden field named redir, with a value of the page I want the user to be redirected to after they login, it still takes them to the phorum index. Also, once at the phorum index the sidebar w/include(quick_auth) does not see the user as being logged in, but, if I login directly from the phorum index and the go back to the homepage, the side bar DOES see the user as being logged in.

I need an effective way of logging the user into phorum from ANYWHERE on the site, and from ANYWHERE on the site calling the users phorum information.



Edited 1 time(s). Last edit at 10/22/2005 03:56PM by markgreene.
Re: S.O.S. - Using Phorum Auth
October 22, 2005 05:08PM
It sounds like you did not follow my previous advice. Have you added the creation of the phorum tmp cookie to your login form, so Phorum knows your browser can handle cookies? If not, re-read this posting.

Your Phorum login scripts decides that your browser does not support cookies somehow and will include the session id in the URL's instead of put it in a cookie. To not loose this session id, Phorum has to make sure you do not leave Phorum, because then your browser will loose the session. Your "redir" hidden field is ignored because of this.
Re: S.O.S. - Using Phorum Auth
October 22, 2005 08:01PM
I did put it there and I was getting the same results. These are what the two files look like. Quick Auth is being called by side_bar. side_bar is being included on every page and being included in header.tpl of the forums.



Edited 1 time(s). Last edit at 10/22/2005 08:24PM by markgreene.
Attachments:
open | download - side_bar.php (2.6 KB)
open | download - quick_auth.php (1.4 KB)
Re: S.O.S. - Using Phorum Auth
October 22, 2005 09:07PM
Using the sidebar login, Phorum does not detect that you can use cookies. Using the Phorum login form on [sphswired.com] everything works like expected (logged in using a cookie).

If I go to your site and look at my cookies, I do not see the temporary cookie. So that cookie is for some reason not set by your code. That's the part that needs fixing.
Re: S.O.S. - Using Phorum Auth
October 22, 2005 09:35PM
This is crap. I don't know what else to do. I am not setting my cookie incorectly. There is nothing else that I can change to that damn setcookie that would make it work! There has got to be something that I am missing. Are you telling me that NO ONE has tried this before=?

Please anyone!
Re: S.O.S. - Using Phorum Auth
October 23, 2005 05:34AM
Have you tried Brians suggestion from the thread that I pointed you to? Move the setcookie() call up all the way in your code, before any output is done. I do not see the cookie when opening your site, so somehow the cookie is not set. Maybe put it at the start of your header.tpl.

Yes people have tried this and people have succeeded.
Re: S.O.S. - Using Phorum Auth
October 23, 2005 05:34AM
Does this login form use a temp cookie? Like on that other post, about header login problems? Do you have other sessions running?

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Sorry, only registered users may post in this forum.

Click here to login