Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Mambo Bridge Support => Topic started by: redbird on October 31, 2004, 06:34:19 AM

Title: Mambo-SMF session error
Post by: redbird on October 31, 2004, 06:34:19 AM
Hello, first post.
Thanks to everyone for all their good work.

I have mambo version 4.5.1a installed.
Using SMF RC2.
Using the bridge downloaded from  Mamboportal (http://www.mamboportal.com/index.php) written by Theodore Hildebrandt, Ver2.

For the most part everything works ok, the problem I'm having is this.
Lets say your returning to the site after 5-6 hours the site comes up, the site recognizes who you are (Hey, joe you have X messages etc). The mambo user menu is available as well as the smf user menu (Can view profile etc.).

However is you fill in a new post and try to post the message you get an error;
Your session timed out while posting. Please try to re-submit your message.

The only way around this is to log out and back in. This happens whether I'm logged on as an admin or just a regular member.

Wondering if anyone can help me out with this or perhap suggest where to look for a place in my install to increase the session length for posting messages. I have already increased the Login Session Lifetime in the Mambo admin panel under the global configuration.

Thanks in advance.
Title: Re: Mambo-SMF session error
Post by: Kris on October 31, 2004, 03:33:16 PM
Maybe read the other topics about this ;) or post there...
Title: Re: Mambo-SMF session error
Post by: Orstio on October 31, 2004, 04:19:08 PM
Change the include in your Mambo template header to this:

<?php 

if (!defined('SMF')){
  require (
"components/com_smf/config.smf.php");
  require (
$smf_path."/SSI.php");
}

if (!
headers_sent())
loadSession();
else
{
if (!isset($_SESSION['rand_code']))
$_SESSION['rand_code'] = '';
$sc = &$_SESSION['rand_code'];

if (@version_compare(PHP_VERSION'4.2.0') == -1)
srand(time());
}


?>

Title: Re: Mambo-SMF session error
Post by: redbird on October 31, 2004, 05:05:38 PM
Orstio
Thanks for the help, I changed it and will wait to see if it corrects it.

Kris,
Thanks for your input, but if you're referring to the post with 330+ replys I did read it and it seems there are several issues being dealt with there, perhaps I missed my issue.
It just seemed easier to just ask my question in a new topic.
Title: Re: Mambo-SMF session error
Post by: redbird on October 31, 2004, 06:43:43 PM
It didn't seem to work, I waited about an hour and a half and I still get the same error message.

I replaced.
<?php  require ("components/com_smf/config.smf.php");
             require ($smf_path . "/SSI.php");
?>

With the code you provided, was that correct?

Thanks again.
Title: Re: Mambo-SMF session error
Post by: Orstio on October 31, 2004, 06:51:02 PM
Yes, that is correct.

Do you have database driven sessions in SMF on or off?  Try changing it to the opposite of what it is now.
Title: Re: Mambo-SMF session error
Post by: redbird on October 31, 2004, 07:22:30 PM

It was on, I turned it off,
Will wait to see.
Thanks