Hi,
This is directly a problem with the bridge, but is probably related to the reply here:
http://modxcms.com/forums/index.php/topic,3565.msg56701.html#msg56701
I’ve just upgraded to SMF 1.1.1 from 1.1RC2. I then received the following error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: ini_set() [function.ini-set]: A session is active. You cannot change the session module’s ini settings at this time.
Error type/ Nr.: Warning - 2
File: /home/xxxxxx/public_html/forum/Sources/Load.php
Line: 1903
Line 1903 source: @ini_set(’session.use_trans_sid’, false);
Parser timing
MySQL: 0.0055 s s (0 Requests)
PHP: 0.1185 s s
Total: 0.1240 s s
I’ve been using the
this snippet so that I could output some of the forum to my webpages via SSI - I assume that this is the cause of the problem.
From the SMF forum code Sources/Load.php
// Attempt to start the session, unless it already has been.
function loadSession()
{
global $HTTP_SESSION_VARS, $modSettings, $boardurl, $sc;
// Attempt to change a few PHP settings.
@ini_set('session.use_cookies', true);
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
/* @ini_set('session.use_trans_sid', false); */
@ini_set('arg_separator.output', '&');
if (!empty($modSettings['globalCookies']))
{
$parsed_url = parse_url($boardurl);
if (preg_match('~^\d{1,3}(\.\d{1,3}){3}$~', $parsed_url['host']) == 0 && preg_match('~(?:[^\.]+\.)?([^\.]{2,}\..+)\z~i', $parsed_url['host'], $parts) == 1)
@ini_set('session.cookie_domain', '.' . $parts[1]);
}
(I’ve commented out the offending line
@ini_set(’session.use_trans_sid’, false); as temporary fix)
The code from Sources/Load.php in SMF 1.1RC2 was:
// Attempt to start the session, unless it already has been.
function loadSession()
{
global $HTTP_SESSION_VARS, $modSettings, $boardurl, $sc;
// Attempt to change a few PHP settings.
if (session_id() == '') {
@ini_set('session.use_cookies', true);
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
@ini_set('session.use_trans_sid', false);
@ini_set('arg_separator.output', '&');
}
if (!empty($modSettings['globalCookies']))
{
$parsed_url = parse_url($boardurl);
if (preg_match('~^\d{1,3}(\.\d{1,3}){3}$~', $parsed_url['host']) == 0 && preg_match('~(?:[^\.]+\.)?([^\.]{2,}\..+)\z~i', $parsed_url['host'], $parts) == 1)
@ini_set('session.cookie_domain', '.' . $parts[1]);
}
Any help would be greatly appreciated,
Thanks.
Edit: I forgot to mention, I’m using MODx 0.9.2.1. I guess I should upgrade that first.