-
AuthorPosts
-
December 2, 2015 at 1:32 am #545683
so i came across the forums and learned their was this concept which we are now trying to use to get rid of php sessions from being used, as they cause our caching system to bypass as a result.
add_theme_support(‘avia_no_session_support’);
it seems to work, but i have no idea what loss of functionality we may see as a result of turning off session support.
Can you inform?
Thanks,
CoryDecember 2, 2015 at 6:23 pm #546028Hi ckwiat!
Breadcrumbs will have issues. Sessions are for saving data for each user when they visit your site for that “session”. We use that for the breadcrumbs to know which page you were on before, etc etc.
It’s a problem with the server so I would contact your hosting provider. See here for more info, https://kriesi.at/support/topic/warning-session_start-function-session-start-help-asap-please/.
Cheers!
Elliott- This reply was modified 8 years, 11 months ago by Elliott.
December 2, 2015 at 7:24 pm #546061the issue is that when a phpsesid is created it triggers our caching to be bypassed. To preserve breadcrumbs wouldn’t be enough benefit to essentially have caching disabled on the site.
Do you have any other solutions? I guess I’m not familiar enough with the way you are setting the breadcrumbs to know why they would be different per user. I suppose you are suggesting that the breadcrumb structure is dynamic based on the users’s path – but my preference would be to have static breadcrumbs anyway.
So I guess I’m asking, does the below avoid us from setting sessions?
add_theme_support(‘avia_no_session_support’);And then you mentioned breadcrumbs having issues with this disabled, what sort of issues?
Many thanks for the reply.
Cory
December 2, 2015 at 8:41 pm #546087Hi!
1. No, not that I know of. You could just leave it off if you wish.
2. Yes.
3. For example when you use the portfolio grid shortcode and click on one of the portfolio posts, they will not have the parent page displayed because they have no idea where you used the portfolio grid shortcode at.
Cheers!
ElliottDecember 2, 2015 at 8:53 pm #546103Many thanks for the replies.
December 2, 2015 at 10:10 pm #546138Hey!
Please do let us know if we can do anything else for you, we will be happy yo assist.
Regards,
BasilisDecember 3, 2015 at 12:29 am #546177one more thing
i have tried to add this to an older version of the enfold theme – and for whatever reason i’m not able to get the phpsessid to stop creating a session. We are able to do this with no issue on the latest version. is there a version at which this would start to function?
add_theme_support(‘avia_no_session_support’);
December 4, 2015 at 6:37 pm #547194Hey!
Yes, most likely. I’m not sure which version it is though. It would be best to use the latest version of the theme anyway. Make sure to update.
Cheers!
ElliottNovember 2, 2017 at 9:45 am #871578Hi
As your are using cookies PHP sessions, headers are automatically set by PHP like I described (https://andidittrich.de/2015/09/php-worry-about-some-magical-added-cache-control-header.html)
The issue is those headers prevent browser caching! and if peole want to use some cache systems like, LiteSpeed Cache, Varnish, etc. those headers ruined the Leverage browser caching…
Using PHP session is the old way to do what you want but worst: there are multiple security vulnerabilities centering around PHP Sessions… :
– http://phpsec.org/projects/guide/5.html
– http://phpsec.org/projects/guide/4.htmlSo what… ? The correct method is to use the database to store session data
Usefull informations:
– https://pressjitsu.com/blog/wordpress-sessions-performance/
– https://wordpress.org/support/topic/php-session-disables-cache/ (another WordPress plugin that was using PHP session
– https://wpengine.com/support/cookies-and-php-sessions/So come on Enfold guys :) Don’t use anymore this old PHP stuff, let’s the breadcrumbs works using something else to store users stuff
Thanks
November 3, 2017 at 1:09 pm #872132Hi,
Thanks for using our theme and pointing this out.
I will forward your suggestions to Kriesi.
Best regards,
GünterJune 11, 2018 at 5:42 pm #971312Hi. How is the process here. 06/2018 we use the session cookie again.
June 13, 2018 at 2:47 am #971994 -
AuthorPosts
- You must be logged in to reply to this topic.