SSI.php login-logout outside system problem.

Started by FlashSplash, May 09, 2010, 04:34:26 AM

Previous topic - Next topic

FlashSplash

Thanks Arantor! I got a solution! Maybe not the best, but system works : )

I have just last question - how to put ssi_logout(); into <a href=""> in php?:
'<li><a href=""><span class="wyloguj"></span></a></li>';

Arantor

'<li><a href="' . $scripturl . '?action=logout;' . $context['session_var'] . '=' . $context['session_id'] . '"><span class="wyloguj"></span></a></li>';

Note that both $scripturl and $context must have been called with global first. (That's literally just what ssi_logout returns)
Holder of controversial views, all of which my own.


FlashSplash

#22
Thanks for the link.

I have no idea why it failed again... It isn't working again, everything is the same as it was. It was so close, I didn't modified anything and suddenly it crashed.

Could you please tell me the name of this binary editior you are using?

Edit: Actually I just deleted this line 172 in SSI.php and everything is working.
// Make sure they didn't muss around with the settings... but only if it's not cli.
if (isset($_SERVER['REMOTE_ADDR']) && !isset($_SERVER['is_cli']) && session_id() == '')
trigger_error($txt['ssi_session_broken'], E_USER_NOTICE);

What for was it created anyway? : )

Arantor

I used FrHed to edit the file.

What it's telling you is that it can't load the session properly, meaning nothing should work properly.

The three bytes added at the start are the UTF-8 Byte Order Mark, the explanation of which is far too convoluted to go into at this stage; look it up on Wikipedia.
Holder of controversial views, all of which my own.


Advertisement: