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
Does your Joomla database user have access to your SMF database? Does your SMF database user have access to your Joomla database?
SMF and Joomla are in the same database.
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?
Can I see a URL?
Do you have cPanel, or another control panel?
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.
To test some things, I am going to need to register. Can you please enable registration in Joomla?
OK, you should be able to register now.
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.
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.
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.
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.
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?
What is on line 1981 of Load.php?
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;
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.
Do you have any SMF mods installed?
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.
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?
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 PMQuoteI 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?
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?
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.
OK, thanks a lot Orstio! :)
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 ???.
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!
You still need this on the bottom of your Joomla template:
<?php mysql_selelct_db($GLOBALS['db_name']); ?>
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!
Yes.
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!
Spelling error:
<?php mysql_select_db($GLOBALS['db_name']); ?>
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!
No, the article printing doesn't use the Joomla template, so that code is never executed.
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!
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.
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!
Don't be surprised if you end up with invalid sessions...
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!
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?
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
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']); ?>
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.
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!
Do you have the discussbot installed?
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!
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."
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!
My problem is it says 'Restricted Access' whenever I try to edit it.
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...
that may be caused by having a template that is not designed for SMF 1.1RC2 or higher
If you have the discussbot installed, you need to enter your SMF database name and database prefix into the discussbot params.
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?
no, I meant the SMF theme
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.
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!