gpt4 book ai didi

php - WORDPRESS:PHP 消息:错误找不到与列列表匹配的全文索引

转载 作者:行者123 更新时间:2023-11-30 21:40:10 25 4
gpt4 key购买 nike

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

出现这个错误:

2018/08/25 08:12:19 [error] 13010#13010: *4875262 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 12288 bytes) in /var/www/html/wp-includes/wp-db.php on line 1889" while reading response header from upstream, client: MY_IP, server: MY_WEB, request: "GET /wp-admin/plugins.php?action=error_scrape&plugin=crayon-syntax-highlighter%2Fcrayon_wp.class.php&_wpnonce=2c7c7334cc HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "MY_WEB", referrer: "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 < '2018-08-25 04:56:52' 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_comments_alter_source, eval, the_content, apply_filters('the_content'), WP_Hook->apply_filters, crp_content_filter, get_crp, get_crp_posts_id" while reading upstream, client: MY_IP, server: MY_WEB, request: "GET /software/test HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "MY_WEB", referrer: "https://WY_WEB/general/test"

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

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

感谢您的帮助。

最佳答案

您需要增加 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`);

关于php - WORDPRESS:PHP 消息:错误找不到与列列表匹配的全文索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52016311/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com