wpdb-phpsessions icon indicating copy to clipboard operation
wpdb-phpsessions copied to clipboard

Got warning: Couldn't fetch mysqli_result in ...

Open codearryaas opened this issue 9 years ago • 15 comments
trafficstars

Warning: mysqli_free_result(): Couldn't fetch mysqli_result in ..\wp-includes\wp-db.php on line 1425.

codearryaas avatar Feb 01 '16 03:02 codearryaas

Thanks for your report. Needs more info, though, what page were you accessing? What command was running before the warning?

soulseekah avatar Feb 01 '16 05:02 soulseekah

Warning is shown in every page. No command was running. I checked in Xampp. If I remove clone from https://github.com/pressjitsu/wpdb-phpsessions/blob/master/wpdb-phpsessions.php#L142 then it doesn't show any errors.

codearryaas avatar Feb 01 '16 05:02 codearryaas

Pretty weird. What version of WordPress are you using? If 4.4.1 latest:

Can you please add if ( ! $this->result ) debug_print_backtrace(); on line 1425 of wp-db.php for debugging purposes, before the call to mysqli_free_result.

soulseekah avatar Feb 01 '16 06:02 soulseekah

Yes I am using WordPress version: 4.4.1. I added if ( ! $this->result ) debug_print_backtrace(); on line 1425 of wp-db.php but output was same warning no other results displayed.

codearryaas avatar Feb 01 '16 06:02 codearryaas

If you disable the plugin is the warning gone?

soulseekah avatar Feb 01 '16 07:02 soulseekah

Yes if I disable then the warning is gone. I am running PHP version: 5.6.12.

codearryaas avatar Feb 01 '16 08:02 codearryaas

How did you enable the plugin in the first place? It requires extra configuration to enable it.

soulseekah avatar Feb 01 '16 09:02 soulseekah

I changed following:

self::$config = self::maybe_user_config( array(
            'enable' => true,
        ) );

Sorry what are the extra configurations?

codearryaas avatar Feb 01 '16 09:02 codearryaas

Yep, that's fine. But we're still not getting any warnings here, so hard to tell what might be wrong, we'll investigate a bit more and see why clone would generate a warning there. Thanks.

soulseekah avatar Feb 01 '16 09:02 soulseekah

Ok thanks, let me know if you got any solutions. I'll also check from my side.

codearryaas avatar Feb 01 '16 11:02 codearryaas

Hi, same here. Is removing $instance->wpdb a good solution? Can I replace it by global $wpdb?

eriktelepovsky avatar Apr 14 '16 21:04 eriktelepovsky

@eriktelepovsky are you on Windows, too?

soulseekah avatar Apr 15 '16 14:04 soulseekah

Nope, Mac OX 10.11.4 and the issue is also on my production server (Debian).

eriktelepovsky avatar Apr 16 '16 06:04 eriktelepovsky

Did you ever resolve this. I have the same issue. It was working fine this morning.

ETA: Please ignore it was a completely different issue causing my problem, this was just a byproduct of my dodgy code!

atticus7 avatar May 03 '17 15:05 atticus7

@atticus7 what was the cause/solution in your case?

tomjn avatar Dec 03 '19 18:12 tomjn