News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

MAMBO: terrible login & logout issues, please help...

Started by marcnyc, November 05, 2004, 12:05:02 PM

Previous topic - Next topic

marcnyc

Unfortunately all three errors still appear once your suggested change is performed in smf.php so if you have any other suggestions please let me know.
I am particularly curious what the result of your testing is on your php5 beta tester's machine with both the error displaying settings set to show all errors and displau them

skizzdc

#22
Hi There!  Thanks so much Orstio for the help the other day regarding the mysql($result) issue, I am now having difficulties getting the integrated login to work.  In response to the troubles experienced as posted in the early parts of this thread, I am having trouble with the integrated login.  I have applied all the extra changes as suggested in the readme file as well.

I can login fine using the module that's distributed with the MOS_SMF zip file, but if I hit logout on the module nothing happens, the link simply seems to refresh the page and I'm still logged in.  If I try to logout through SMF obviously I log out of SMF but not through MOS.

I read a bit of this forum and noticed there was a newer version out, so swapped it for the other one I was using, only problem is now I'm getting the same mysql($result) error associated with the prefix being mos_instead of my chosen table prefix.  I see that Orstio has put in a variable for that to try and fix that, but to no avail, unfortunately I'm getting the same error as well as when I do login and then try and logout, the same thing happens. 

Any ideas?

Sorry for the beefy question.

Orstio

OK, try uploading the new smf.php to your com_smf folder.  In a very early version of that file for RC1, I had forgotten a line that would cause the logout issue you describe.

QuoteI read a bit of this forum and noticed there was a newer version out, so swapped it for the other one I was using, only problem is now I'm getting the same mysql($result) error associated with the prefix being mos_instead of my chosen table prefix.  I see that Orstio has put in a variable for that to try and fix that, but to no avail, unfortunately I'm getting the same error as well as when I do login and then try and logout, the same thing happens.

This is pretty confusing.  So, you set the variable $mos_prefix?  And that put you back to the logout problem?  Or do you still get the SQL error?  (You've got two different things a bit mixed up.)

skizzdc

Sorry for the confusion, hopefully this clears things up.

QuoteSo, you set the variable $mos_prefix?

No, I thought this is what you fixed when I spoke with you earlier about the mysql_fetch_array() error.  Thats less important, as I'm using the modified version from the 2.0beta release.

QuoteOK, try uploading the new smf.php to your com_smf folder.  In a very early version of that file for RC1, I had forgotten a line that would cause the logout issue you describe.

Ok, I've done that and now I can login with no problems as before, and when I click logout, it works only with SMF, and I'm still logged into Mambo.  Also I'm getting the following error when I log in or out:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/hatereport/components/com_smf/smf.php on line 40

Orstio

QuoteQuote
So, you set the variable $mos_prefix?

No, I thought this is what you fixed when I spoke with you earlier about the mysql_fetch_array() error.  Thats less important, as I'm using the modified version from the 2.0beta release.

No, you'll see in config.smf.php, that you have to set the variable $mos_prefix to whatever your Mambo table prefix happens to be. (Don't forget the underscore! ;) )

skizzdc

Aha!  I knew it would be something silly like that I was overlooking.  Cheers for that!

skizzdc

Okay so now login and log out is working wonderfully except that when I'm logged in it takes me to the SMF login screen.  This is gonna be pretty confusing for my users, as they get a login screen after they've logged in.  How can I make it so that after login the users are redirected to the main forum page?

Orstio

In MOS_SMF.php, line 13, change $_SESSION['login_url'] = "http://address to go to after logging in";

This is $mosConfig_live_site by default..... you must have changed it, or you are not allowing guests to view your forum.

skizzdc

Ok, tried that, but no matter what I do it redirects to

http://mysite/index.php?option=com_smf&Itemid=41&?action=login;sa=check;id=1

I tested it with both my Admin and my testing user account as well as with both 2 browsers (FireFox and crappy IE).  I have specifically put the address in place of $mosConfig_live_site.  Am I meant to change the variable $mosConfig_live_site or do as I did?

Orstio

In your SMF settings, are guests allowed to view the forum?

skizzdc

Yeah if you check at http://hatereport.entempore.com/forum/ [nofollow] they can see it, or through Mambo at http://hatereport.entempore.com/index.php?option=com_smf&Itemid=42 [nofollow] they are able to see the posts and everything.  Is there something else in SMF permissions I'm supposed to set?

Orstio

What bothers me is this: "action=login;" appearing in your query string.  That should not be possible from MOS_SMF.php, unless you have changed something.  It should be "action=mambo_login".

skizzdc

Yeah that is weird.  I checked smf.php mod_smf_login.php adn MOS_SMF.php and all have "action=mambo_login" and not "action="login" except for the following in MOS_SMF.php:

redirectexit('action=login;sa=check;id=' . $ID_MEMBER);

I'm guessing this is the problem.  I don't remember changing this, but how do I set it again?  Do I put:

redirectexit('action=mambo_login');

Or is that wrong, sorry I'm not good at PHP at all.

Orstio

Change it back to this:

redirectexit('action=mambo_login;sa=check;id=' . $ID_MEMBER);

skizzdc

Thanks again for your super friendly and fast support!  Great job on the software!

Advertisement: