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
|
Posted: Sat Aug 24, 2002 1:19 am Post subject: Possible fix for IIS Servers Login Issue |
|
|
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  _________________ "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 |
|
 |
dotdotspace
Joined: 15 Mar 2002 Posts: 138 Location: Seattle, WA
|
Posted: Sat Aug 24, 2002 5:37 am Post subject: |
|
|
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.  |
|
Back to top |
|
 |
wzoo1
Joined: 22 Aug 2002 Posts: 4
|
Posted: Sat Aug 24, 2002 6:01 pm Post subject: IT WORKS! :) |
|
|
IT WORKS on IIS AND LOGS IN! THANK YOU SOO MUCH!!!  |
|
Back to top |
|
 |
dotdotspace
Joined: 15 Mar 2002 Posts: 138 Location: Seattle, WA
|
Posted: Sun Aug 25, 2002 8:12 pm Post subject: |
|
|
this DOES work. i am glad.
michel, might want to sticky this topic.  |
|
Back to top |
|
 |
PushUpstairs
Joined: 22 Aug 2002 Posts: 7 Location: London, UK
|
Posted: Thu Sep 12, 2002 11:45 pm Post subject: |
|
|
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 |
|
 |
b2idiot
Joined: 22 Sep 2002 Posts: 17
|
Posted: Tue Sep 24, 2002 8:00 pm Post subject: |
|
|
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 |
|
 |
telar
Joined: 25 Sep 2002 Posts: 5
|
Posted: Wed Sep 25, 2002 6:30 am Post subject: |
|
|
Thanks....
Great well....i can use the b2 now.... |
|
Back to top |
|
 |
PushUpstairs
Joined: 22 Aug 2002 Posts: 7 Location: London, UK
|
Posted: Wed Oct 02, 2002 5:27 pm Post subject: |
|
|
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 |
|
 |
|