上传了一个比较大的主题,大概9MB这么大

413 Request Entity Too Large

这个是nginx的锅:

location ~ \.php $

{

...

}

中加入:

client_max_body_size 20m;即可解决

--------------------------------------------------------------------------------------------------

再次上传主题,报错信息变成:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

目前只知道这个报错来:wp-admin/includes/file.php的

( 'The uploaded file exceeds the %1$s directive in %2$s.' ),

思考了很久很久,最后猜测可能是在/etc/下面.

编辑/etc/php/7.4/fpm/php.ini文件

修改upload_max_filesize = 20M

service php7.4-fpm restart

--------------------------------------------------------------------------------------------------

第3次上传Retro主题,上传成功了.

--------------------------------------------------------------------------------------------------

我们点击下Activate来激活主题,出现

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

找到wp-config.php设置如下:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true ); 
define( 'WP_DEBUG_DISPLAY', true );

注意debug模式会导致网站性能下降,排查完毕后,应该全部改回false

刷新页面后得到如下报错:

Fatal error: Uncaught Error: Call to undefined function mysql_error() in /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/db.class.php:29 Stack trace: #0 /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/db.class.php(127): UniteDBRev->checkForErrors('fetch') #1 /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/lib/revslider/inc_php/revslider_slider.class.php(1639): UniteDBRev->fetch('hg_revslider_sl...', '', 'id', '', 'ASC') #2 /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/classes/Admin/Theme/Element/Select/Slider.php(47): RevSlider->getArrSliders() #3 /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/classes/Custom/MetaBox/Item/Portfolio.php(51): Admin_Theme_Element_Select_Slider::getSliders() #4 /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/classes/Custom/MetaBox/Item/Portfolio.php(11): Custom_M in /homepages/25/d70642623/htdocs/_hafleg_de-wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/db.class.php on line 29

Die Website weist technische Schwierigkeiten auf.

使用[1]中的办法解决

----------------------------------------------------------------------------------------------------------------------------------------------------

刷新页面得到:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/php7.php on line 17

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/php7.php on line 17

Fatal error: Uncaught Error: [] operator not supported for strings in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/base_admin.class.php:70 Stack trace: #0 /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/revslider_admin.php(153): UniteBaseAdminClassRev::addMetaBox() #1 /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/revslider_admin.php(68): RevSliderAdmin->addSliderMetaBox() #2 /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/revslider_admin.php(40): RevSliderAdmin->init() #3 /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/revslider.php(132): RevSliderAdmin->__construct() #4 /home/appleyuchi/wordpress/wp-includes/template.php(730): require_once('/home/appleyuch...') #5 /home/appleyuchi/wordpress/wp-includes/template.php(676): load_template() #6 /home/appleyuchi/wordpress/wp-content/themes/retro/functions.php(59): locate_template() #7 /home/appleyuchi/wordpress/wp-settings.php(514): include('/home/appleyuch...') #8 /home in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/base_admin.class.php on line 70

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

解决方案:

base_admin.class.php的第70行

self::$arrMetaBoxes[] = $box;

改成:

self::$arrMetaBoxes = $box;

----------------------------------------------------------------------------------------------------------------------------------------------------

继续刷新得到:

Warning: mysqli_error() expects exactly 1 parameter, 0 given in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/db.class.php on line 31

第31行改为:

if(mysqli_error(mysqli_connect("localhost","appleyuchi","appleyuchi","wordpress"))){

----------------------------------------------------------------------------------------------------------------------------------------------------

继续刷新得到:

Fatal error: Uncaught Error: Cannot use object of type UniteSettingsAdvancedRev as array in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/base_admin.class.php:82 Stack trace: #0 /home/appleyuchi/wordpress/wp-includes/class-wp-hook.php(289): UniteBaseAdminClassRev::onAddMetaboxes() #1 /home/appleyuchi/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters() #2 /home/appleyuchi/wordpress/wp-includes/plugin.php(478): WP_Hook->do_action() #3 /home/appleyuchi/wordpress/wp-admin/includes/meta-boxes.php(1578): do_action() #4 /home/appleyuchi/wordpress/wp-admin/edit-form-blocks.php(390): register_and_do_post_meta_boxes() #5 /home/appleyuchi/wordpress/wp-admin/post.php(187): require('/home/appleyuch...') #6 {main} thrown in /home/appleyuchi/wordpress/wp-content/themes/retro/lib/revslider/inc_php/framework/base_admin.class.php on line 82

搞不定了,先放弃吧还是....php基础不够..

Reference:

[1]php5.4.45代码升级到php7.3.4后不支持mysql_xxx的解决方法

wordpress使用retro方案出现413 Request Entity Too Large(Activate还是有问题)相关推荐

  1. wordpress上传文件报错的解决方法(413 Request Entity Too Large、超过upload_max_filesize文件中定义的php.ini值)

    报错:413 Request Entity Too Large 问题nginx是限制上传大小,解决方法如下: 打开nginx配置文件 nginx.conf, 路径一般是:/etc/nginx/ngin ...

  2. php 上传 413,PHP CURL上传文件出现413 Request Entity Too Large

    php在使用CURL上传文件时出现413 Request Entity Too Large,网上也查找了很多方案,但是都不起作用 经仔细检查,发现curl_setopt的各个参数设置的顺序也会有影响. ...

  3. 413 request entity too large php,413 Request Entity Too Large

    昨天用wordpress发布文章,文章内容是一个网站一段时间来的运行信息,20几页的列表结果粘到编辑器. 点击发布后,页面卡住了,过了一会返回浏览器显示"413 Request Entity ...

  4. 上传大文件,出现: 413 request Entity too Large错误的解决办法

    工作中遇见了一个问题,就是上传一个100M的文件,会报413 request Entity too Large错误,下面给出解决方式. 经过排查,发现服务器使用nginx作为反向代理服务器,报上名错误 ...

  5. k8s-ingress 413 Request Entity Too Large

    k8s集群中,将图片或是文件上传到文件服务器上, 可是大于1M是就会报错 413 Request Entity Too Large 参考文档: https://github.com/kubernete ...

  6. Nginx出现“413 Request Entity Too Large”错误解决方法

    今天使用phpmyadmin的导入功能的时候,由于sql文件过大,服务器出现错误提示了,413 Request Entity Too Large,google了一下,发现是Nginx的错误提示.  解 ...

  7. WCF错误远程服务器返回了意外响应: (413) Request Entity Too Large。解决方案

    WCF错误远程服务器返回了意外响应: (413) Request Entity Too Large.解决方案 参考文章: (1)WCF错误远程服务器返回了意外响应: (413) Request Ent ...

  8. nginx产生【413 request entity too large】错误的原因与解决方法

    nginx产生[413 request entity too large]错误的原因与解决方法 参考文章: (1)nginx产生[413 request entity too large]错误的原因与 ...

  9. git 提交失败 HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

    为什么80%的码农都做不了架构师?>>>    关于git提交失败报错POST git-receive-pack (chunked)或者HTTP 413 curl 22 The re ...

最新文章

  1. shiro 文档_spring---Shiro拦截器
  2. boot jpa mysql postman spring_听说过spring-data-jdbc么?来个最佳实践
  3. php字符串search,js获取location.search每个查询字符串的值
  4. vm磁盘映射 不能启动_Oracle的启动与关闭-数据库(4)
  5. 人工智障学习笔记——机器学习(5)朴素贝叶斯
  6. 【零开始】怎样购买、配置服务器及发布网站(页)?
  7. sagemath matlab,开源跨平台数学软件SageMath v8.1
  8. 2022-09-08 mysql/stonedb-慢SQL-出现问题的SQL-Q2
  9. 【CodingNoBorder - 07】无际软工队 - 求职岛:ALPHA 阶段测试报告
  10. Constructing and Embedding Abstract Event Causality Networks from Text Snippets
  11. VS无法打开项目文件“Web.csproj” -此安装不支持该项目类型问题解决方案
  12. python画图y轴在右侧_Python 使用matplotlib画图添加标注、及移动坐标轴位置
  13. 使用ESP8266接入阿里云物联网平台(阿里 云智能APP)可远程控制电脑开关机,灯光等设备 CP2102, CH340
  14. 微信商户号25位招商银行号
  15. 王爽汇编语言第三版答案
  16. 微信小程序给电商行业创业的新曙光
  17. mpvue利用painter生成海报
  18. 2022年度总结——2022我在CSDN的那些事暨2023我的目标展望:Pursue freedom Realize self-worth
  19. WP系统一次订阅,终身锁屏同时显示农历和天气
  20. Office 2019 激活-探索(仅供参考)

热门文章

  1. shell脚本if条件总结
  2. 最大公约数之和——极限版II
  3. 使用pull解析XML文件
  4. 成员变量的初始化和内存中的运行机制
  5. 微软职位内部推荐-Software Engineer II-Web app
  6. volatile 和 sig_atomic_t
  7. jQuery 动画效果
  8. 基于node.js+MongoDB+elementui的分页功能更新优化
  9. pve安装黑群晖直通硬盘_基于ProXmoX VE的虚拟化黑群晖6.2安装,硬盘直通
  10. ClickHouse分布式集群部署