You are right, the SMF doesn't know something about the wiki, I add a new Tab and it's okay.
I tested the thing with subdomain cookies and I can login at my SMF without any error. But the MW give me new warnings: "session_name() [function.session-name.php]: session.name cannot be numeric or empty " in /home/restofthepath/folder/wiki/extensions/Auth_SMF.php on line 333" and "session_destroy () [function.session-destroy.php]: Trying to destroy uninitialized session in /home/restofthepath/folder/wiki/extensions/Auth_SMF.php on line 334"
This is the function
function UserLogoutSMF (&$user)
{
global $wgCookiePrefix, $wgSessionName;
// Log them out of wiki first.
$user->doLogout();
// Destory their session.
$wgCookiePrefix = strtr($wgCookiePrefix, "=,; +.\"'\\[", "__________");
$old_session = session_name(isset($wgSessionName) ? $wgSessionName : $wgCookiePrefix . '_session');
session_destroy();
// Destroy the cookie!
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000, $params['path'], $params['domain'], $params['secure'], $params['httponly']);
// Back to whatever we had (we hope mediawiki).
session_name($old_session);
// Now SMFs turn.
smf_sessionSetup();
// This means we have no SMF session data or unable to find it.
if (empty($_SESSION['session_var']))
return true;
smf_redirectWrapper('logout_url', 'logout;' . $_SESSION['session_var'] . '=' . $_SESSION['session_value']);
}
Line 333 and 334 are
$old_session = session_name(isset($wgSessionName) ? $wgSessionName : $wgCookiePrefix . '_session');
session_destroy();
I changed in the localsettings.php the domain cookie from ".mydomain.com" to "mydomain.com" and after reload the wiki I got only the first warning with line 333.