简体   繁体   中英

php.ini max_input_vars overwritten, no idea by what

I've checked dozens of posts on here & other sites and have no luck in fixing this issue so far.

I have a ubuntu server, using the Virtualmin administration panel, and this server is hosting a Prestashop ecommerce site.

I am getting this error when trying to perform some Prestashop operations:

PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini.

Virtualmin provides 3 php.ini files to edit, and in all 3 of those I edited this value to 9999. Double checked to make sure they saved and they did. Restarted the server and still no luck.

Advice from other posts suggests placing a php.ini, or a php5.ini, file directly in to the publichtml, and Prestashop administration directories. Added them there, restarted server, still set to 1000.

From other advice I installed phpinfo() script, (which you can view here if you want - http://zamozuan.com/phpinfo.php ) and it says 1000 in there as well.

That file lists /etc/php5/cgi as config file path, and loaded config file: /home/zamozuan/etc/php5/php.ini. I made sure the ini's at those locations were edited, restarted... still no luck.

Other suggestions were to use a .htaccess file with "php_value max_input_vars 9999"... tried this (at the various locations suggested) again... no luck.

Some other suggestions said it may be overwritten by.... suhosin? but that module is not installed.

It seems max_input_vars is being overwritten by something else and I have no idea what... if it is from virtualmin itself, something in Prestashop, some random ini file somewhere... NO CLUE what to do...

Any advice for how to even debug this would be appreciated... the site is incomplete and not working properly until this issue gets fixed.

Hope someone can help...

Create a php file and add this. It will find the php.ini and should grep for the max_inpiut_vars

<?php
$inipath = php_ini_loaded_file();
$pattern = "/max_input_vars/i"; 
if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
    $line = preg_grep($pattern, file( $inipath));
    echo $line;
} else {
    echo 'A php.ini file is not loaded';
}
?>  

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