dqeq885710 2018-06-14 15:45
浏览 69

使用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)

  • 写回答

3条回答 默认 最新

  • douzi4724 2018-06-14 19:24
    关注

    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');
    
    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看