简体   繁体   中英

Warning: phpmyadmin max_input_vars error

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 ??

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM