sessions and wordpress

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

sessions and wordpress

Haluk Karamete
Hello,

Are the important consequences of using Sessions in WordPress?
If there are, could someone elaborate the most vital things to in  a few
sentences..

At the top of my head, I am thinking there might be some issues with
Sessions as far as scalability, code performance, multisite, or multiple
servers configurations... Not sure, if these concerns are valid though...

And in general, is avoiding the sessions considered "best-practice" in the
WordPress world?

as always, this question pertains to sites that gets heavy traffic.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: sessions and wordpress

Mika Epstein
PHP Sessions?

You massively screw up anyone with Varnish Caching for one (PHP Sessions
effectively tells Varnish "No, bro, you don't need to cache, so lemme
load up like a logged in user!")

Haluk Karamete wrote:

>
> Hello,
>
> Are the important consequences of using Sessions in WordPress?
> If there are, could someone elaborate the most vital things to in a few
> sentences..
>
> At the top of my head, I am thinking there might be some issues with
> Sessions as far as scalability, code performance, multisite, or multiple
> servers configurations... Not sure, if these concerns are valid though...
>
> And in general, is avoiding the sessions considered "best-practice" in the
> WordPress world?
>
> as always, this question pertains to sites that gets heavy traffic.
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: sessions and wordpress

Haluk Karamete
Sure that's a big one Mike.
I'd like to hear more problems with sessions though. I'm just building a
case study on why sessions should be avoided as far as WordPress goes.
On Nov 15, 2013 7:27 AM, "Mika A Epstein" <[hidden email]> wrote:

> PHP Sessions?
>
> You massively screw up anyone with Varnish Caching for one (PHP Sessions
> effectively tells Varnish "No, bro, you don't need to cache, so lemme load
> up like a logged in user!")
>
> Haluk Karamete wrote:
>
>>
>> Hello,
>>
>> Are the important consequences of using Sessions in WordPress?
>> If there are, could someone elaborate the most vital things to in a few
>> sentences..
>>
>> At the top of my head, I am thinking there might be some issues with
>> Sessions as far as scalability, code performance, multisite, or multiple
>> servers configurations... Not sure, if these concerns are valid though...
>>
>> And in general, is avoiding the sessions considered "best-practice" in the
>> WordPress world?
>>
>> as always, this question pertains to sites that gets heavy traffic.
>> _______________________________________________
>> wp-hackers mailing list
>> [hidden email]
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: sessions and wordpress

Otto-19
It's not really a question of WordPress specifically. PHP sessions have
rather poor support on various hosting systems, as I discovered the hard
way. There's also caching issues and so forth.

If you're making code for your own site, where you control the setup and
configuration, then that's one thing. But making code designed to be used
across lots of different sites and configurations and setups is a slightly
different story.

-Otto


On Fri, Nov 15, 2013 at 10:22 AM, Haluk Karamete <[hidden email]>wrote:

> Sure that's a big one Mike.
> I'd like to hear more problems with sessions though. I'm just building a
> case study on why sessions should be avoided as far as WordPress goes.
> On Nov 15, 2013 7:27 AM, "Mika A Epstein" <[hidden email]> wrote:
>
> > PHP Sessions?
> >
> > You massively screw up anyone with Varnish Caching for one (PHP Sessions
> > effectively tells Varnish "No, bro, you don't need to cache, so lemme
> load
> > up like a logged in user!")
> >
> > Haluk Karamete wrote:
> >
> >>
> >> Hello,
> >>
> >> Are the important consequences of using Sessions in WordPress?
> >> If there are, could someone elaborate the most vital things to in a few
> >> sentences..
> >>
> >> At the top of my head, I am thinking there might be some issues with
> >> Sessions as far as scalability, code performance, multisite, or multiple
> >> servers configurations... Not sure, if these concerns are valid
> though...
> >>
> >> And in general, is avoiding the sessions considered "best-practice" in
> the
> >> WordPress world?
> >>
> >> as always, this question pertains to sites that gets heavy traffic.
> >> _______________________________________________
> >> wp-hackers mailing list
> >> [hidden email]
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: sessions and wordpress

Nikola Nikolov
How would you handle data like a shopping cart?

I'm just curious what other options you have that would be okay to use.
Would you store the session data in the database maybe? I know storing it
in a cookie is not an overly good idea.


On Fri, Nov 15, 2013 at 7:34 PM, Otto <[hidden email]> wrote:

> It's not really a question of WordPress specifically. PHP sessions have
> rather poor support on various hosting systems, as I discovered the hard
> way. There's also caching issues and so forth.
>
> If you're making code for your own site, where you control the setup and
> configuration, then that's one thing. But making code designed to be used
> across lots of different sites and configurations and setups is a slightly
> different story.
>
> -Otto
>
>
> On Fri, Nov 15, 2013 at 10:22 AM, Haluk Karamete <[hidden email]
> >wrote:
>
> > Sure that's a big one Mike.
> > I'd like to hear more problems with sessions though. I'm just building a
> > case study on why sessions should be avoided as far as WordPress goes.
> > On Nov 15, 2013 7:27 AM, "Mika A Epstein" <[hidden email]> wrote:
> >
> > > PHP Sessions?
> > >
> > > You massively screw up anyone with Varnish Caching for one (PHP
> Sessions
> > > effectively tells Varnish "No, bro, you don't need to cache, so lemme
> > load
> > > up like a logged in user!")
> > >
> > > Haluk Karamete wrote:
> > >
> > >>
> > >> Hello,
> > >>
> > >> Are the important consequences of using Sessions in WordPress?
> > >> If there are, could someone elaborate the most vital things to in a
> few
> > >> sentences..
> > >>
> > >> At the top of my head, I am thinking there might be some issues with
> > >> Sessions as far as scalability, code performance, multisite, or
> multiple
> > >> servers configurations... Not sure, if these concerns are valid
> > though...
> > >>
> > >> And in general, is avoiding the sessions considered "best-practice" in
> > the
> > >> WordPress world?
> > >>
> > >> as always, this question pertains to sites that gets heavy traffic.
> > >> _______________________________________________
> > >> wp-hackers mailing list
> > >> [hidden email]
> > >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >>
> > > _______________________________________________
> > > wp-hackers mailing list
> > > [hidden email]
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: sessions and wordpress

Nicholas Ciske-2
If you need session-like storage in a plugin:

GitHub: https://github.com/ericmann/wp-session-manager

See Pippins review about his use in Easy Digital Downloads:
http://wordpress.org/support/view/plugin-reviews/wp-session-manager

_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske

On Nov 15, 2013, at 11:37 AM, Nikola Nikolov wrote:

> How would you handle data like a shopping cart?
>
> I'm just curious what other options you have that would be okay to use.
> Would you store the session data in the database maybe? I know storing it
> in a cookie is not an overly good idea.
>

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: sessions and wordpress

Hal Burgiss
In reply to this post by Nikola Nikolov
On Fri, Nov 15, 2013 at 12:37 PM, Nikola Nikolov <[hidden email]>wrote:

> How would you handle data like a shopping cart?
>
> I'm just curious what other options you have that would be okay to use.
> Would you store the session data in the database maybe? I know storing it
> in a cookie is not an overly good idea.
>
>
>
You can define the session handler. You can use mysql or memcached for
instance, to handle load balancer type issues.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers