Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Mambo Bridge Support => Topic started by: the twig on September 14, 2006, 03:59:03 AM

Title: Error message: Load.php line 1981
Post by: the twig on September 14, 2006, 03:59:03 AM
I've been getting this error message on the front page that I see when I've tested my site live:

Database Error: Table 'database.sessions' doesn't exist
File: ...Load.php
Line: 1981
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

So, I did a search on this forum, added the relavent php code to the bottom of my Joomla template, per one thread:

<?php mysql_select_db($GLOBALS['db_name']); ?>

Then I changed both Joomla and SMF admins to be the same (name, username, e-mail, password) per another thread.

Then I completely uninstalled the bridge and then reinstalled it.

Then I logged into the bridge.

Nothing worked, I'm still getting the error message, and Joomla sees "both" identical administrators as logged in separately, so I must not have made them exactly the same somehow, but name/display name, username, e-mail, and password are identical.

Here's my versions:

Joomla 1.0.11
SMF 1.1 RC3
Orstio's Bridge 1.1.6
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 14, 2006, 06:33:26 AM
Does your Joomla database user have access to your SMF database?  Does your SMF database user have access to your Joomla database?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 14, 2006, 07:58:25 AM
SMF and Joomla are in the same database.
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 14, 2006, 06:04:28 PM
On edit—

I just checked the database permissions again for Joomla and SMF—they are (and always have been) the same—same database, same user name, same password. Both systems have database tables set up within the database with their system prefixes, respectively.

So what is going on?

And my identical users in Joomla and SMF are not synched up, not seeing each other as the same user. Should I give synchronization a try?
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 14, 2006, 06:40:03 PM
Can I see a URL?

Do you have cPanel, or another control panel?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 14, 2006, 07:06:15 PM
OK, I'll put the site online briefly, and PM you the URL.

It's not cPanel, I don't have options (that I can find) to set users. It's GoDaddy's default hosting manager.
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 14, 2006, 07:47:22 PM
To test some things, I am going to need to register.  Can you please enable registration in Joomla?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 14, 2006, 07:52:42 PM
OK, you should be able to register now.
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 14, 2006, 08:11:29 PM
Registration doesn't seem to be working, either.

On edit- It still won't produce another image, but you can register on the wrapped site now in SMF registration. Don't ask me why. However, it then tells you "you are not allowed to moderate on this forum!"

If I weren't so exhausted, I would laugh hysterically.
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 14, 2006, 10:50:57 PM
I think your caching engine is getting a little over-zealous, for starters.  For the sake of testing your site, you should leave caching off in both Joomla and SMF. 
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 06:21:52 PM
I checked caching in Joomla and SMF, and they're both turned off.  ???

I'm still getting that error message, did you find anything that could be causing that?

Also, how do I redirect error messages so they don't appear on the front page?

Thanks.
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 17, 2006, 06:38:35 PM
QuoteHowever, it then tells you "you are not allowed to moderate on this forum!"

Where is it redirecting you after you login?

I wasn't getting this at all when I logged in.
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 07:20:55 PM
If you didn't get the "you are not allowed to moderate on this forum," then it's a secondary concern, at this point. It could just be me trying to create another user from the same IP address ???

The error message I'm concerned about is the original one that I started the thread with. What is causing that and how can I get rid of it? How can I move error messages off the front page, for future reference, so I can see them but a user doesn't?
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 17, 2006, 07:31:17 PM
What is on line 1981 of Load.php?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 07:58:00 PM
It's under function sessionWrite after the section, //First try to update an existing row...the code that starts on 1981 in the next section: // If that didn't work, try inserting a new one):

// If that didn't work, try inserting a new one.
if (db_affected_rows() == 0)
$result = db_query("
INSERT IGNORE INTO {$db_prefix}sessions
(session_id, data, last_update)
VALUES ('" . addslashes($session_id) . "', '" . addslashes($data) . "', " . time() . ")", __FILE__, __LINE__);

return $result;
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 08:13:24 PM
I just checked again (by taking my site online) and the error message is gone! What the?!

Cool, I guess. But where can I redirect error messages off the front page for future reference?

The caching thing still seems to be happening—seemingly related to the changes I made because of this error message, since I didn't notice it happening before. Could it be a browser issue? The site is wierd when I log in as another user. It doesn't want to log me out. Also, the upshrink buttons won't work until I refresh the page now.
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 17, 2006, 09:00:07 PM
Do you have any SMF mods installed?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 09:43:12 PM
I have your discussbot installed, and the Joomla Tag Cleanup package, which I just de-installed (it wasn't working anyway).

I still can't logout as the alias user.
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 17, 2006, 09:54:02 PM
QuoteThe site is wierd when I log in as another user. It doesn't want to log me out.

That is usually caused by the wrong setting of subdomain independent cookies or local storage of cookies.

QuoteI have your discussbot installed

Ah.  Do you have the database name and prefix entered into the discussbot params?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 10:16:58 PM
Quote from: Orstio on September 17, 2006, 09:54:02 PM
QuoteThe site is wierd when I log in as another user. It doesn't want to log me out.

That is usually caused by the wrong setting of subdomain independent cookies or local storage of cookies.

How do I fix that?

Quote from: Orstio on September 17, 2006, 09:54:02 PM
QuoteI have your discussbot installed

Ah.  Do you have the database name and prefix entered into the discussbot params?

My bad, sorry. I guess it was that causing the error?
Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 10:19:46 PM
I saw in a thread that someone arranged to have errors e-mailed to them. I've looked but can't find the answer—how do I do that? Will that keep errors off the front page?
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 17, 2006, 10:31:53 PM
Your frontpage error reporting is controlled by the setting in your Joomla admin panel, Global Configuration.

QuoteQuote
The site is wierd when I log in as another user. It doesn't want to log me out.

That is usually caused by the wrong setting of subdomain independent cookies or local storage of cookies.

How do I fix that?

Go to your SMF admin panel.  Click on Server Settings.  Click on Feature Configuration. 

Make sure that local storage of cookies is off.

If Subdomain independent cookies is on, turn it off.  If it's off, turn it on.

Title: Re: Error message: Load.php line 1981
Post by: the twig on September 17, 2006, 11:40:58 PM
OK, thanks a lot Orstio! :)
Title: Re: Error message: Load.php line 1981
Post by: Nicolas on September 18, 2006, 10:16:39 AM
Hi,

I have the same problem.

It looks like the bridge searches the smf_sessions table in the joomla database instead of the smf database ???.
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 24, 2006, 05:56:49 PM
Hello there,
same here.....error is visible when trying to print an Article that is has smf discussbot (on or off doesn't matter)  {mos_smf_discuss:no_discuss}.
Despite the fact that smf discuss bot is configured to point to correct (separate) database the error is still refering as if smf_sessions table shold be in Joomla DB vs. SMF.....strange, the cookie trick on SMF didn't work either. :(

Any ideas???
Thank you all for the attention to the thread!
All the best!

Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 24, 2006, 06:01:24 PM
You still need this on the bottom of your Joomla template:

<?php mysql_selelct_db($GLOBALS['db_name']); ?>
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 24, 2006, 06:14:16 PM
in addition to suggested tweak by smfboot of?
<?php ob_start('output');$buffer ob_get_contents();ob_end_clean();
$buffer str_replace('<input type="hidden" name="sc" value="" />',
'<input type=hidden name="sc" value="'.$sc.'">'$buffer);echo $buffer;?>



still no difference...strange, I have tried to delete the cookies etc. still pops up at the bottom of the printed article...the article content it fine thouhg.
Thanks Orstio for keeping up with this old thread.
All the best!
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 24, 2006, 06:22:32 PM
Yes.
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 24, 2006, 06:26:03 PM
no love even with the addition of <?php mysql_selelct_db($GLOBALS['db_name']); ?>
interesting thing is that when making a PDF of the article the error is Not there (nor are the images) :(
Now while reading the article I get an error of:
Fatal error: Call to undefined function mysql_selelct_db() in /home/domain/public_html/templates/template_name/index.php on line 241

hm...
Thanks again!
All the best!
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 24, 2006, 06:39:03 PM
Spelling error:

<?php mysql_select_db($GLOBALS['db_name']); ?>
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 24, 2006, 06:46:38 PM
on the article display error is gone (thank you  :) ) but the original issue is still there with the 'article printing'.
Perhaps something to be tweaked in Load.php?
Thanks again,
All the best!
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 24, 2006, 06:50:52 PM
No, the article printing doesn't use the Joomla template, so that code is never executed.
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 24, 2006, 07:09:06 PM
hm, i belive I am using the correct bot of smf.discussbot.php 4.1 beta 7 2005-11-23 chadness
...I am out ideas  :-X
Thanks agin Orstio,
All the best!
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 24, 2006, 07:11:37 PM
Printing the article does not use the Joomla template.

The code to switch to the SMF database is in the Joomla template (you just put it there a few posts up).

Because the printing the article does not use the template, and the code is in the template, the code is not executed when printing the article.

This has nothing to do with the bot.
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 26, 2006, 05:49:01 PM
it turns out that I had to manually create the table in Joomla DB
ref:
http://www.simplemachines.org/community/index.php?topic=90169.0

Thanks again!
All the best!
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 26, 2006, 05:54:51 PM
Don't be surprised if you end up with invalid sessions...
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 26, 2006, 06:07:08 PM
You are killing me  :D just as I thought this would work...the error is not stopping any functionality...it is just that error is there visible and printed that is bothering me... :-\
All the best!
Title: Re: Error message: Load.php line 1981
Post by: shen brood on September 27, 2006, 09:45:21 AM
I get the same error or message at the bottom of my pages at www.broodonline.com

Database Error: Table 'brood_main.sessions' doesn't exist
File: /home/brood/public_html/forum/Sources/Load.php
Line: 1981

How can this be removed?
Title: Re: Error message: Load.php line 1981
Post by: Worsin on September 27, 2006, 12:07:45 PM
Quote from: shen brood on September 27, 2006, 09:45:21 AM
I get the same error or message at the bottom of my pages at www.broodonline.com

Database Error: Table 'brood_main.sessions' doesn't exist
File: /home/brood/public_html/forum/Sources/Load.php
Line: 1981

How can this be removed?

i get the same thing and i made a post about it here

http://www.simplemachines.org/community/index.php?topic=116472.0

With mine i have determined that while wrapping the forums and having the logon module showing it will give the error, so i think that it is caused by this logon module
Title: Re: Error message: Load.php line 1981
Post by: Kindred on September 27, 2006, 05:28:58 PM
Quote from: Orstio on September 24, 2006, 06:01:24 PM
You still need this on the bottom of your Joomla template:

<?php mysql_selelct_db($GLOBALS['db_name']); ?>
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 27, 2006, 05:46:24 PM
Quote from: shen brood on September 27, 2006, 09:45:21 AM
I get the same error or message at the bottom of my pages at www.broodonline.com

Database Error: Table 'brood_main.sessions' doesn't exist
File: /home/brood/public_html/forum/Sources/Load.php
Line: 1981

How can this be removed?

Most likely, you have the discussbot installed, and you did not configure it.
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 27, 2006, 11:39:41 PM
I found another suggestion:
http://forum.joomla.org/index.php/topic,64554.0.html
that basically states:
QuoteYou can try to add this line at the end of your template

             <?php mysql_select_db($GLOBALS['db_name']); ?>

             If it doesn't help, locate a file called MOS_SMF.php in the smf directory.

              find this line

             // Off to the merry board index we go!

             and add the following line just before it.

              mysql_select_db($db_name);

Small problem with this suggestion is ...where is the MOS_SMF.php ?
All the best!
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 28, 2006, 05:53:07 AM
Do you have the discussbot installed?
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 28, 2006, 11:38:40 AM
yes sir, tried removing disabeling it...deleting all the files that have something to do with discussbot...the same. and the darn thing is there only on print...which conceptually does need discussbot in order to pull comments into print page. I am stumped....
and strange thing is that people live this: google results >> (http://www.google.com/search?hl=en&q=smf_sessions+doesn%27t+exist&btnG=Google+Search)

Thanks again!
All the best!
Title: Re: Error message: Load.php line 1981
Post by: shen brood on September 28, 2006, 12:50:24 PM
How will I configure the discussbot and where can I download it?  I have an installed discussbot but it says "Restricted Access" whenever I click on it.

Another problem that might be related to this is I can't logout in the website and forum it says, "Session verification failed. Please try logging out and back in again, and then try again."
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 28, 2006, 01:15:00 PM
ops thought that was directed my way..

@shen brood 
you can check it by going to:

Mambots-->Site mambots-->smf.discussbot
then ensure that you filled out:

SMF Database Name:_________
and
SMF database prefix:__________

but other than this I am no help lol
All the best!
Title: Re: Error message: Load.php line 1981
Post by: shen brood on September 28, 2006, 01:47:13 PM
My problem is it says 'Restricted Access' whenever I try to edit it.
Title: Re: Error message: Load.php line 1981
Post by: shen brood on September 28, 2006, 01:58:44 PM
I removed the discussbot and the added code on the template and the message at the bottom had been removed and I was also able to log-out once more... hmmm weird...
Title: Re: Error message: Load.php line 1981
Post by: Kindred on September 28, 2006, 03:30:03 PM
that may be caused by having a template that is not designed for SMF 1.1RC2 or higher
Title: Re: Error message: Load.php line 1981
Post by: Orstio on September 28, 2006, 06:03:23 PM
If you have the discussbot installed, you need to enter your SMF database name and database prefix into the discussbot params.
Title: Re: Error message: Load.php line 1981
Post by: shen brood on September 28, 2006, 10:57:02 PM
Quote from: Kindred on September 28, 2006, 03:30:03 PM
that may be caused by having a template that is not designed for SMF 1.1RC2 or higher

Are you relating to the Joomla Template?
Title: Re: Error message: Load.php line 1981
Post by: Kindred on September 29, 2006, 07:46:41 AM
no, I meant the SMF theme
Title: Re: Error message: Load.php line 1981
Post by: shen brood on September 29, 2006, 08:02:29 AM
I always update the SMF Theme to make it compatible with the version that we are using so it can't possibly be compatibility issue with the theme.
Title: Re: Error message: Load.php line 1981
Post by: lebisol on September 29, 2006, 12:29:05 PM
hello gurus,
here is one way that it seems to have worked.
Not sure if this is a 'healthy' way of doing it but what I did was:
-used the snip of code at the bottom of the page as Orstio suggested.
-disabled 'Use database driven sessions' in SMF

the error is gone but...
what is the pitfall of non-databse sessions?

edit note: my host upgraded to php 5.0.5 without notice....is SMF even ready for it?

Thanks again!
All the best!