News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

ssi_login - failed to unserialize SMF cookie

Started by jastend, June 07, 2012, 05:52:23 PM

Previous topic - Next topic

jastend

Hi,

Sorry to bother you guys with a question for the third time, but I'm (again) stuck at one point.

Currently I'm trying to integrate SMF into a Wordpress framework. I'm using the latest version of both. Wordpress is installed in /beta/ and smf in /beta/forum/ under the same sub domain. For the integration, I'm using the layer system that is described in this wiki entry.

The point where I'm stuck right now is the integration of two things:

       
  • Login / Out trough the navigation in wordpress (to make my questions easier, I will focus on this function)
  • Permitting some sites in wordpress only to users with usergroup X in SMF
Therefor I successfully added the include of the SSI.php and now it is working with things like parsing the latest threads. I'm also able to see a login form and log into the forum with it. Unfortunately, there is a problem with the cookie that SMF generates and the login form is always present.
The following circumstences are present:

       
  • The cookie is global (pointing to /).
  • The name of the cookie is not colliding with the one of Wordpress
  • The Wordpress cookie is working fine.
  • I have the same problem like the creator of this thread - when I parse the cookie through the provided script, it tells me: "failed to unserialize SMF cookie"
I have already tried to turn of magic quotes via .htaccess but it is not fixing the problem.

To be honest, I have no idea how to implement the other possible solutions from the linked thread, so I'm seeking for assistance and recommendations how I may be able to make the SMF cookie work in Wordpress.

Arantor

Sounds to me like WP is processing cookies before SMF gets to them. SMF really doesn't like anything messing with its cookies, and is really not designed with integration to WP in mind.

There is a WP integration available which might be useful to look at.

I'm honestly not sure what you need WP for, modifying SMF will give you a cleaner and faster result (since WP is a bloated toad of a piece of software, e.g. 20 queries for the front page in a fresh install)

jastend

Thank you for your answer Arantor, but I really have no intension of arguing with you how crappy Wordpress is.

Is there a way to change the way cookies are generated by SMF? I'm referring to this post, which I don't understand tbh.

Quote from: Arantor on June 07, 2012, 06:04:02 PM

There is a WP integration available which might be useful to look at.


Do you remember what it's called?

Arantor

I just don't get why you're going to the effort of combining two systems when SMF with a few modifications can handle far more than anything you want to throw at WP.

Anyway, http://custom.simplemachines.org/mods/index.php?mod=3008

There is no way to modify the way cookies are handled, short of rewriting the code underlying there. Mind you, if you're so desperate to keep WP, why not use something like Simple:Press instead? You avoid all the hassle and get all the benefits of working with WP, such as they are.

Advertisement: