Loss of SESSION in Login2()?

Started by mvandemar, December 12, 2007, 10:11:55 AM

Previous topic - Next topic

SleePy

mvandemar,

What version of PHP are you using?

I think I made a break through in the cause of this, but would need to verify your php version. I think it is a bug in php which was fixed in 4.3.3, but seems to have come around again I think in 5.2.5
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

mvandemar

PHP 5.1.6 - Apache/2.0.46

PHP API  20041225 
PHP Extension  20050922 
Zend Extension  220051025 


-Michael

SleePy

If you reverse the change I suggested or what ever hack you are doing and use $_SESSION['login_url'].
Then Open Subs-Auth.php
Find:
// Version 4.3.2 didn't store the cookie of the new session.
if (version_compare(PHP_VERSION, '4.3.2') === 0)
setcookie(session_name(), session_id(), time() + $cookie_length, $cookie_url[1], '', 0);


Replace:
// Version 4.3.2 didn't store the cookie of the new session.
setcookie(session_name(), session_id(), time() + $cookie_length, $cookie_url[1], '', 0);


I was able to get this to work on my tests after doing this, it seems some versions of php still have this issue :|
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

xjessie007

Hi, I think there is still a problem with this. I started setting up SMF for my web yesterday, it is version 1.1.6. When I go to a topic page and then log in, it takes me to the board index page instead of the topic page. Would anyone know if this can be fixed by some module that I can download, or if I still need to change the LogInOut.php and Subs-Auth.php code mentioned in this thread? I am just traing to refrain from hacking the code because it would be more pain when upgrading down the road.. tx.
When traveling to the Schengen zone (most of Europe), remember that some nationals need so called Schengen visa. Schengen visa is a travel document.
Check the schengen visa travel guide

xjessie007

Just for reference, here is a post that solved this for my configuration (SMF 1.1.6. using pretty urls)

http://www.simplemachines.org/community/index.php?topic=267511.0


-------------
www.maxi-pedia.com - Maxi-Pedia: Your resource for finance & IT!
www.finance-management.cz - Central European Center for Finance and Management
When traveling to the Schengen zone (most of Europe), remember that some nationals need so called Schengen visa. Schengen visa is a travel document.
Check the schengen visa travel guide

gggggggg

Hello, I was wondering if anyone has this working how they want.  And if so, what they did.

I have been reading all these threads and testing all the options, but I cant get it to work.

I have SMF 2.0 RC2.   Does anyone have any end to end instructions for using SSI.php and having the login box on my main site, and having the user authenticate against SMF, then redirect back to my main page?

THanks


Advertisement: