【问题标题】:WORDPRESS: PHP message: Error Can't find FULLTEXT index matching the column listWORDPRESS:PHP 消息:错误找不到与列列表匹配的 FULLTEXT 索引
【发布时间】:2019-01-31 15:13:14
【问题描述】:

尝试为 WordPress 安装此插件:Crayon Syntax Highlighter

这个错误出来了:

2018/08/25 08:12:19 [错误] 13010#13010: *4875262 FastCGI 在标准错误中发送:“PHP 消息:PHP 致命错误:允许的内存大小为 536870912 字节用尽(尝试分配 12288 字节) /var/www/html/wp-includes/wp-db.php 在第 1889 行”,同时从上游读取响应标头,客户端:MY_IP,服务器:MY_WEB,请求:“GET /wp-admin/plugins.php?action= error_scrape&plugin=crayon-syntax-highlighter%2Fcrayon_wp.class.php&_wpnonce=2c7c7334cc HTTP/1.1”,上游:“fastcgi://unix:/var/run/php/php7.0-fpm.sock:”,主机:“MY_WEB ", 推荐人: "https://MY_WEB/wp-admin/plugins.php?plugin=crayon-syntax-highlighter%2Fcrayon_wp.class.php"

现在这个错误总是出现:

2018/08/25 09:56:52 [error] 7054#7054: *2403 FastCGI sent in stderr: "PHP message: Error Can't find FULLTEXT index matching the column list de la base de datos de WordPress para la consulta SELECT DISTINCT wp_posts.ID FROM wp_posts WHERE 1=1 AND MATCH (post_title,post_content) AGAINST ('test test') AND wp_posts.post_date = '2015-08-26 04:56:52' AND wp_posts.post_status = 'publish' AND wp_posts.ID != 96174 AND wp_posts.post_type IN ('post', 'page') LIMIT 0, 6 realizada por require(' wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, paged_cmets_alter_source, eval, the_content, apply_filters( 'the_content'), WP_Hook->apply_filters, crp_content_filter, get_crp, get_crp_posts_id" 同时读取上游,客户端:MY_IP,服务器:MY_WEB,请求:"GET /software/test HTTP/1.1",上游:"fastcgi://unix: /var/run/php/php7.0-fpm.sock:", 嗬st:“MY_WEB”,引用者:“https://WY_WEB/general/test

网络正常,但日志中出现该错误。

我有 php 7,服务器版本:10.1.26-MariaDB-0 + deb9u1 Debian 9.1,WordPress 4.9.6

感谢您的帮助。

【问题讨论】:

    标签: php mysql wordpress


    【解决方案1】:

    您需要增加 wordpress 使用的内存限制。您可以将以下代码添加到您的 wp-config.php 文件中。

    define( 'WP_MEMORY_LIMIT', '1024M' );
    

    *请注意,1024M 只是一个示例,您可以根据您的系统向上或向下调整它。您应该首先找出默认的 php memory_limit 是什么并逐步调整,直到它解决您的问题。

    从命令行:

    php -r 'phpinfo();' | grep memory_limit
    

    使用 phpinfo() 函数:

    在您的 wordpress 根目录中添加一个文件,其中包含:

    <?php phpinfo; ?>
    

    ...并在浏览器中打开 http://localhost/.phpinfo.php 并查找 memory_limit 值。完成后删除此文件,因为它可能存在安全风险。


    至于第二个错误,在'post_title'和'post_content'所在的表上添加一个FULLTEXT索引:

    ALTER TABLE `wp_posts` ADD FULLTEXT(`post_title`,`post_content`);
    

    【讨论】:

    • 我想修复第二个错误。第一个来自 Crayon Syntax Highlighter 插件,我不再安装。
    • memory_limit: 512M,数据库重量超过 2 GB。
    • @avi2018 你可能会使用 1G 开销:所以在你的 wp-config.php 文件中添加 define( 'WP_MEMORY_LIMIT', '1G' );
    • @avi2018 这两个错误并不相关,尽管看起来可能是这样。添加 wp-config fix 后,您可以尝试重新激活 Crayon Syntax Highlighter 插件。
    • 第二个错误出现在想要激活那个插件之后。似乎它停留在过程的中间并在数据库中留下了错误。此命令修复了第二个错误:ALTER TABLE wp_postsADD FULLTEXT (`post_title, post_content`);我无法激活插件,我在系统中没有太多内存来按该插件的要求加载整个数据库。感谢您的帮助,问题已解决(第 2 次)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 2014-03-08
    • 1970-01-01
    • 2015-06-23
    • 2015-11-18
    • 1970-01-01
    相关资源
    最近更新 更多