• Resolved bobbobbius

    (@bobbobbius)


    Hello!
    There is a conflict with the WP Cerber Security.

    In Cerber – Console – Session’s tab.

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    `AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in /wp-content/plugins/wp-cerber/cerber-common.php:4196\nStack trace:\n#0 /wp-content/plugins/wp-cerber/cerber-common.php(4196): unserialize()\n#1 /wp-content/plugins/wp-cerber/admin/cerber-dashboard.php(589): crb_unserialize()\n#2 /wp-content/plugins/wp-cerber/admin/cerber-users.php(1139): cerber_get_ip_info()\n#3
    /wp-admin/includes/class-wp-list-table.php(1450): CRB_Sessions_Table->column_default()\n#4
    /wp-admin/includes/class-wp-list-table.php(1390): WP_List_Table->single_row_columns()\n#5
    /wp-content/plugins/wp-cerber/admin/cerber-…’

    There also was an error with UsageDD. But i contacted with author and he fixed his plugin.
    Discussion was here https://forum.dion-designs.com/t9259/docket-cache-compatibility/

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

    (@nawawijamili)

    Hi there,

    Seems the error was caused by the “unserialize” function in Cerber code.

    File: wp-content/plugins/wp-cerber/cerber-common.php
    Line: 4196

    Please edit that file and replace “unserialize” with “maybe_unserialize

    Original code:

    function crb_unserialize( &$string ) {
        if ( PHP_VERSION_ID >= 70000 ) {
            return @unserialize( $string, [ 'allowed_classes' => false ] );
        }
    
        return @unserialize( $string );
    }

    Fixed code:

    function crb_unserialize( &$string ) {
        if ( PHP_VERSION_ID >= 70000 ) {
            return @maybe_unserialize( $string, [ 'allowed_classes' => false ] );
        }
    
        return @maybe_unserialize( $string );
    }

    Or you may try the fix from this repo:
    https://github.com/nawawi/wp-cerber.

    For clarification, Composer is not a framework, it is a PHP package manager and Docket Cache uses the Symfony components, not a framework.

    Thanks.

    Thread Starter bobbobbius

    (@bobbobbius)

    Thanks a lot!
    Seems it works.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conflict with Cerber’ is closed to new replies.