boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Possible fix for IIS Servers Login Issue

 
Post new topic   Reply to topic    boardom Forum Index -> Installation issues
View previous topic :: View next topic  

Did this solve your problem?
Yes
 50%  [ 3 ]
No
 50%  [ 3 ]
Total Votes : 6

Author Message
PushUpstairs



Joined: 22 Aug 2002
Posts: 7
Location: London, UK

PostPosted: Sat Aug 24, 2002 1:19 am    Post subject: Possible fix for IIS Servers Login Issue Reply with quote

Hi All,

After an hours hard debugging after installing b2 on my IIS server, I have managed to get it running and logging in successfully.

Basically, the problem lies in the b2login.php script and the way that IIS and PHP are handling the setcookie() and header(location: "") functions. The combination of these does not appear to work - hense cookies are not set - so no cookie can be found when the validation function is called.

To fix this alter the following lines in the b2login.php script. Please note that I was using the b2-0.6pre4-20020813 version of b2 (line numbers may not correspond in other versions).
Code:

Line 037
--------
  From: header("Location: b2login.php");
  To  : header("Refresh: 0;url=b2login.php");

Line 133
--------
  From: header("Location: $location");
  To  : header("Refresh: 0;url=$location");


FYI: I am using IIS v5.0 and PHP v4.2.2

As I said, i managed to work out that all the other scripts were working, including getting the username/password from the database and comparing that with the value on the form. My problem was that cookies were not being set on the client as IIS/PHP were not sending them. All cookie read functions appear to work (if the cookies are there and sent in the request to the webserver! )

I hope that helps some of you.

If you need any assistance then please send me a pm or come to IRC channel #xpire/#pushupstairs whilst connected to an efnet server (my nick is Push)

Kind Regards,
Push Very Happy
_________________
"Keyboard not detected. Press F1 to continue..."

Get a useless fact @ http://www.pushupstairs.com/fact/


Last edited by PushUpstairs on Sat Aug 24, 2002 11:05 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
dotdotspace



Joined: 15 Mar 2002
Posts: 138
Location: Seattle, WA

PostPosted: Sat Aug 24, 2002 5:37 am    Post subject: Reply with quote

wow.. it looks like this might actually work. i'll let you guys know when i update my site to v0.6pre4 tomorrow. i'm not going to do it now because i'm at an xbox party. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
wzoo1



Joined: 22 Aug 2002
Posts: 4

PostPosted: Sat Aug 24, 2002 6:01 pm    Post subject: IT WORKS! :) Reply with quote

IT WORKS on IIS AND LOGS IN! THANK YOU SOO MUCH!!! Smile
Back to top
View user's profile Send private message
dotdotspace



Joined: 15 Mar 2002
Posts: 138
Location: Seattle, WA

PostPosted: Sun Aug 25, 2002 8:12 pm    Post subject: Reply with quote

this DOES work. i am glad. Smile

michel, might want to sticky this topic. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PushUpstairs



Joined: 22 Aug 2002
Posts: 7
Location: London, UK

PostPosted: Thu Sep 12, 2002 11:45 pm    Post subject: Reply with quote

BTW: If this doesn't solve your problem... please post why and what environment you are working in - i'll try and help you further. Don't forget to set register_globals=on in your php.ini either!!

Peace. Push
Back to top
View user's profile Send private message Visit poster's website
b2idiot



Joined: 22 Sep 2002
Posts: 17

PostPosted: Tue Sep 24, 2002 8:00 pm    Post subject: Reply with quote

My problem with it seems weird. globals are on tec but even after I put the coding above in I still get the wrong login/password screen. It brings up b2edit.php and I'm sure I have the right password and all. Help?
Back to top
View user's profile Send private message
telar



Joined: 25 Sep 2002
Posts: 5

PostPosted: Wed Sep 25, 2002 6:30 am    Post subject: Reply with quote

Thanks....
Great well....i can use the b2 now....
Back to top
View user's profile Send private message
PushUpstairs



Joined: 22 Aug 2002
Posts: 7
Location: London, UK

PostPosted: Wed Oct 02, 2002 5:27 pm    Post subject: Reply with quote

b2idiot wrote:
My problem with it seems weird. globals are on tec but even after I put the coding above in I still get the wrong login/password screen. It brings up b2edit.php and I'm sure I have the right password and all. Help?


Have you checked the password that is contained in the database? I have heard that this can sometimes not be set correctly.

Also, what environment are you working in? IE browser version?

It appears as though the Header problem is only related to certain IE versions - I know that IE is affected. Cookies aren't set for this forum either because I have IE5...!
_________________
"Keyboard not detected. Press F1 to continue..."

Get a useless fact @ http://www.pushupstairs.com/fact/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Installation issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group