• Hi,
    In addition to the plugin Participants Database, the plugin Bookly is also active on my website (https://www.booking-wp-plugin.com/). An essential function in Bookly does not work as long as Participants Database is active. The following error message is logged in the PHP error log:
    PHP Fatal error: Uncaught Error: Call to a member function withSubServices () on bool in …
    Neither the hosting provider nor the Bookly support found errors in the server environment (PHP Settiings) or in the Bookly plugin.
    The assumption of the Bookly supports is “Maybe this plugin changes something on the PHP sessions or overload sessions settings.”

    Another plugin is actually used as a workaround: WP Database Session Handler. While this plugin ist actice, both plugins are working correctly. But I would prefer to understand the problem and if possible not to live with this workaround.

    My homepage runs with WordPress 5.4.2 and PHP 7.4. All plugins are up to date.

    What could be the problem?

    Regards
    Michael

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Participants Database only uses php sessions to obtain a session ID, and will only initiate a session if one is not already initiated. This is supposed to avoid problems with other plugins that use sessions. It does not overload any session functionality.

    You will want to update your WordPress, 5.4.2 is pretty old. I don’t suspect it will solve the problem, but it’s a good idea.

    There may be more that is relevant in the error log, that one entry is not telling the whole story.

    I’ve had reports of problems with Bookly before, and have not been able to identify what exactly the issue is. I would like to fix it, but I don’t know what to fix at this point.

    Hi all.

    Will everything is ok with your plugin if we change the line classes/PDb_Session.php:190?

    from
    if ( session_status() !== PHP_SESSION_ACTIVE ) {
    to
    if ( session_status() !== PHP_SESSION_ACTIVE && session_status() !== PHP_SESSION_NONE ) {

    With that change, Bookly works ok. I’m able to see that when Bookly is enabled then session_status() returns 1, but you checking is session_status() returns 1 or 0 and trying to create a session again.

    Please let me know if I’m correct and it is helpful.

    Plugin Author xnau webdesign

    (@xnau)

    Well, I can’t test it right now, but that’s interesting. I really appreciate you sharing the code that made it work, thanks, I’ll investigate further.

    I don’t see any harm in leaving that code in there, it’s just checking for the session in a slightly different way.

    Thread Starter tatti01

    (@tatti01)

    Many thanks to xnau and bathead. The hotfix is working fine. Bookly plugin and Participants Database plugin are both working at once.

    @xnau, is it possible for you to implement this hotfix to your next update so I don’t loose the changes while updating?

    Again, thanks a lot for your great support.

    Best regards
    Michael

    Plugin Author xnau webdesign

    (@xnau)

    There is a fix in the current release. Your code helped me solve the problem, thanks.

    Thread Starter tatti01

    (@tatti01)

    @xnau I updated to the current release version 1.9.6.6 and the problem is again here. Bookly support will apply the hotfix again.
    Perhaps you mean in the next release?

    Best regards
    Michael

    Plugin Author xnau webdesign

    (@xnau)

    No, that is supposed to fix it, but since I have no idea what the problem is, and can’t test it, it was my best guess. So I’m not completely surprised.

    The code you provided worked by basically disabling the use of sessions by the plugin (the expression would always resolve as false), so there might have been other problems caused by that.

    I do have one more idea to try, but that will have to wait for the next release.

    If you want to use the code you found that worked, you can try it, Participants Database will use the alternate session method (because the use of php sessions is disabled), and should work fine. That will be on line 189 of the plugin file classes/PDb_Session.php

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Fatal error in another plugin while Participants plugin is active’ is closed to new replies.