News:

Wondering if this will always be free?  See why free is better.

Main Menu

Logout-Problem using SSI.php

Started by chilly, March 18, 2010, 06:22:27 PM

Previous topic - Next topic

chilly

Hi,

first: I'm not sure if this is the right section.
second: i searched for topics with my problem, but didnt find topics having exactly my problem so... ->

im writing a site where i want to use SMF login / logout (and same session)

that "new" site has different files but everyfile requires "include.php" at the start (file to include important stuff)

include.php first saves the name of the called script (the script the user called via http. e.g.: index.php / user.php)
next step is looking for SSI.php. If the script finds SSI.php it uses require_once to load it.

that part seems to work.

later in the Script im using ssi_logout() to generate and show a logout link.
when i hit that link i get an error message (see file in attachments)

same error if i hit ssi_examples.php and hit the logout link.

Language Coordinator

Kays

Hi, what the translation for that error message?

Which version SMF? I believe there was a problem with RC2.

One thing to check is to go into the Admin CP> Server Settings > Feature Configuration and set the following:

Enable local storage of cookies - unchecked
Use database driven sessions - checked

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

chilly

translation....

failed to verify session. please log out and in again than try again. (funny... logging out was the problem *g*)

i installed smf2.0 rc2 and upgraded it to rc3 (think update was on 16th, march)

subdomain undependent cookies is checked
local storage of cookies is not checked (would cause problems with the first mentioned setting)
database driven sessions -> checked

didnt change any of that settings (only directly after installation)

Language Coordinator

Kays

If you hover over the logout link does it appear to be like this with eight characters after logout; and before the equal sign. "="

?action=logout;e26594bd=2025b8e2cbca1865bd5adff278f7a4a4

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

chilly

yep but different than the link of the forum.

forum: index.php?action=logout;c71242bb6=0582a82af3d3b46b7f2ed358ec17784f
site: index.php?action=logout;fb8d5c72303=f2bc460bfe0b9f14070421bb7b8862db (ok 11 not 8 characters)
examples: index.php?action=logout;c71242bb6=0582a82af3d3b46b7f2ed358ec17784f (looks exactly the same today.... and works....)

Language Coordinator

chilly

#5
looks like... on my site im getting a different session.
if i login on the site i automaticaly get logged in in forums too, but forum uses different session than site.

my only problem is... i dont know how to get the correct session...

btw...
$_COOKIE[session_name()] is not same as $_SESSION['session_value']

OK.... something more i got... deleted the cookies for forums + site (firefox showed 4 different cookies.... 1 for subdomain forums, 1 for my site and 2 for my domain (different cookie name - PHPSESSID + SMFCookie<num>)

now logout works...

will post here if i encounter such problems again ;)

Language Coordinator

topleya

I've had this issue for ages. I have every SSI going on my site, but logout has never worked for me

Kays

Glad you found that. I have seen something similar happen in the past with Firefox.

Current session can be found with $context[/session_id'] or $_SESSION['rand_code']

@ topleya
Please start your own topic if the suggestions in this thread doesn't help resolve your problem.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

quadraxas

i solved this by using same cookiename for both site and the smf, and non-database sessions.

subdomain undependent cookies is checked
local storage of cookies is not checked
database driven sessions unchecked

i am using codeigniter and a smf wrapper class for the main site.
before that i was getting diffrent logout links, now it works. (topic is no very old so in case anyone still need help.)

Advertisement: