dorbmd1177 2017-11-04 16:24 采纳率: 100%
浏览 167

警告:phpmyadmin max_input_vars错误

phpMyAdmin => NOW <= flashes "Warning: a form on this page has more than 1800 fields. On submission, some of the fields might be ignored, due to PHP's max_input_vars configuration."

My max_input_vars is 10000, it reports as such in the phpinfo in the browser, I am running php-fpm, and it WAS set to 1800 as what was an "over-ride" value in the php-fpm pools as a php_admin_value, but even when all were all commented out of all pools and php-fpm and httpd restarted - the error persists

I am running a true un-managed VPS - not a GoDaddy or other host company limited VPS

Operating system    CentOS Linux 7.4.1708
Perl version    5.016003
Apache version  2.4.29
PHP versions    5.6.32, 5.6.32, 7.0.25
MySQL version   10.2.9-MariaDB
Kernel and CPU  Linux 2.6.32-042stab120.16 on x86_64
Processor information   Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz, 4 cores
CPU load averages   1.39 (1 min) 0.70 (5 mins) 0.59 (15 mins)
Real memory 11.72 GB total / 5.42 GB used
Local disk space    60 GB total / 35.35 GB free / 24.65 GB used

I even put them all back in the pool.conf files as a php_admin_value - 10000 and restarted php-fpm, mariadb and httpd. yet it persists and it just started this with the upgrade to phpMyAdmin 4.7.5 and php 5.6.32 via yum (remi repo)

Is this value hard coded somewhere? Or have I missed changing it somewhere ??

Anyone have any clue what I am missing here ??

  • 写回答

1条回答 默认 最新

  • duan2428 2017-11-07 22:43
    关注

    As Remi suggests - as I said above in the comment also - I had already set the =>

     php_admin_value[max_input_vars] = 10000
    

    in the pool files and as Remi points out in his blog at https://developers.redhat.com/blog/2017/10/25/php-configuration-tips/

    I added AFTER that change above

     SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    

    to the etc/httpd/conf.d/php.conf file

    see bottom of post where fkooman points out that a "$1" should be added to the command shown in the blog post without it.

    However the server calls php-fpm in the main www conf and each virtual host in the httpd.conf and ssl.conf files as follows using the UNIX SOCKET approach and not TCP config. the first Timeout 600 is for Apache - and the ProxySet Timeout-3600 is for php-fpm - at least that is the way it seems to work

     Timeout 600
     # Proxy declaration
     <Proxy "unix:/var/run/php-fpm/xxxxxxx.com.sock|fcgi://php-fpm">
         # we must declare a parameter in here (doesn't matter which) or it'll not register the proxy ahead of time
         ProxySet connectiontimeout=5 timeout=3600
         ProxySet disablereuse=off
     </Proxy>
     # Redirect to the proxy
     <FilesMatch \.php$>
         SetHandler "proxy:unix:/run/php-fpm/xxxxxxx.com.sock|fcgi://localhost"
     </FilesMatch>
    

    This is in part because the server uses http2 and mpm-event.so - because in part Codeit after their version 2.4.28 Apache build no longer supports http2 with pre-fork and it would timeout - because php-fpm is sensitive to timeouts if the command is not placed properly for the manner of php-fpm being called.

    See https://forum.remirepo.net/viewtopic.php?id=3240 and https://httpd.apache.org/docs/2.4/mod/mod_proxy.html and ESPECIALLY https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyset

    I have not seen the error again --- yet --- so far, by going to the phpMyAdmin Export page tab where it normally appeared.

    Thanks to Remi - I think the missing HTTP_AUTHORIZATION is what cleared it.

    评论

报告相同问题?

悬赏问题

  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染