• I manage a website for a non-profit, and Participant’s Database is used to track our members. I don’t use PDB forms, I import data from WPForms. So my use of PDB is limited though I have spent hours setting everything up to display lists, with searches, etc.

    HOWEVER, the PDB cookie is blocking the server side cache throughout the site. In an effort to fix this, the server administration at DreamHost wrote some code that prevents the pages that display data from PDB from being cached. But that didn’t help. I need caching on the site, as we are an ART organization and use a lot of images throughout the site. I have toggled the PDB alternative session setting, but that didn’t work (according to the Dreamhost admin). Is there a way to stop PDB from writing a dynamic session or cookie to the whole site and isolate it just to the page(s) where PDB is in play?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author rolandbarker

    (@rolandbarker)

    I don’t fully understand how the cache on your server works, I can only comment on what Participants Database does.

    Participant Database only writes a cookie if it can’t get a session from php. It’s only going to to do that if the site is serving plugin content (in other words, a page with a Participants Database shortcode), so it is not doing that on any other pages. Cookies do persist, though, so the cookie will be in the browser on other pages, but the plugin doesn’t write or read a cookie on other pages. The cookie’s path is to the site root, so this may be what your hosting support is referring to, but I cannot change that because the cookie needs to be available sitewide.

    As I mentioned before, cookies are only used if sessions are not available from php. If php sessions are working properly on the server, the plugin will not write a cookie, so that is one way to avoid having the cookie.

    Now, if you’re only using Participants Database to display records, then possibly the plugin’s use of php sessions is not needed. I have not tested this, this issue has not come up before. I don’t currently have a way built into the plugin to avoid the use of sessions altogether.

    You definitely do not want to use the “Alternate php Session Method” because that is what writes the cookie…but it will automatically go into that mode if it can’t get the session from php.

    Something you might want to try is to disable the code that writes the cookie. This happens in the plugin file classes/PDb_Session.php on line 387. Comment that out like this:

    //setcookie( $this->cookie_name(), $sessid, 0, '/' );

    If this solves the problem, let me know, I will provide a way to disable the writing of cookies.

    Thread Starter hoyert

    (@hoyert)

    Thank you so much for getting back to me so quickly. I commented out the line you referenced that set the cookie. And it does appear that the cache is working now. I also unchecked the alternate session setting. Thanks again. You’ve saved the day.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cache Broken by Participants Database’ is closed to new replies.