使用WordPress插件WP-Typography,致命错误允许内存大小耗尽

I recently installed the plugin WP-Typography in a WordPress website.

Now, every second time I open a site from this webiste, I get this PHP error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in …/wp-typography/vendor/mundschenk-at/wp-data-storage/src/class-transients.php on line 128

Here the function of the PHP file. The line 128 is the return statement at the bottom.

/**
 * Retrieves a cached large object.
 *
 * @param string $key The cache key.
 *
 * @return mixed
 */
public function get_large_object( $key ) {
    $encoded = $this->get( $key );
    if ( false === $encoded ) {
        return false;
    }

    $uncompressed = @\gzdecode( \base64_decode( $encoded ) ); // @codingStandardsIgnoreLine
    if ( false === $uncompressed ) {
        return false;
    }

    return $this->maybe_fix_object( \unserialize( $uncompressed ) ); // @codingStandardsIgnoreLine
}

I basically understand server issues, I also understand programming and PHP but I was hoping that anyone knows this problem before I start tracking down the whole plugin.

The PHP memory limit of the webserver is 64M. It does not change anything if I increase it. I also added the two following lines to the php.ini and it also did not change the behaviour.

realpath_cache_size = 16k

realpath_cache_ttl = 120

Here some others information:

PHP Version: 5.6.33-0+deb8u1

Apache Version: Apache/2.4.10 (Debian)

The issue really isn't those lines in the one plugin; it sounds like the host has capped php memory usage for each account in their global php configs. Ask them.

You can try these settings in wp-config.php, but there's no guarantee they will override the hosts' settings:

// memory for each php process
define('WP_MEMORY_LIMIT', '128M');

// memory for WP admin
define('WP_MAX_MEMORY_LIMIT', '512M');

Additional information: I am my own host. I can set any PHP setting but I read in other forums, that it isn't just the memory limit with this error. I just tried it with 256MB but it still throws this error. Please tell me which PHP settings I have to adjust.

You need to set your PHP memory limit (maybe in addition to the WordPress define). The error is triggered by wp-Typography, but not caused by it. Be sure to double check in which php.ini you have increased memory_limit. You probably have different ones for CLI, CGI and PHP-FPM.