Hi Modxers!
I have Modx 0.95 with SMF 1.1.2 and the SMF Module 1.0.
When users try to directly access the Forum (not following a link) and without being logged in, the following error message is displayed:
: Table 'database-main.smf_sessions' doesn't exist
/correctpath/forum/Sources/Load.php
1986
The smf_session table doesn’t exist in that database, that is correct. But why is SMF attempting to access the wrong db?
However, if one reloads the page, it works...
The Load.php function that is mentioned in the error looks as follows.
function sessionRead($session_id)
{
global $db_prefix;
if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
return false;
// Look for it in the database.
$result = db_query("
SELECT data
FROM {$db_prefix}sessions
WHERE session_id = '" . addslashes($session_id) . "'
LIMIT 1", __FILE__, __LINE__);
list ($sess_data) = mysql_fetch_row($result);
mysql_free_result($result);
return $sess_data;
}
Any ideas? Where does SMF get the wrong db-name? I checked all the files and found no solution.
BTW - I don’t really understand how the integration module works. Could anyone give a short explanation (or tell me where it can be found)?
Konsum