douruduan8812 2015-05-04 17:34
浏览 67

php.ini max_input_vars被覆盖,不知道是什么

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 - ) 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...

  • 写回答

1条回答 默认 最新

  • dongzhan8620 2015-05-04 17:54

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

    $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';
    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 学校优化算法sbo和蚁群算法怎么结合
  • ¥20 Apache poi使用问题
  • ¥21 matlab怎么求时域信号的二阶导数
  • ¥15 判断两个表是否完全相同
  • ¥15 java map类型数据格式,如何快速通过前缀匹配元素
  • ¥15 stc12c5a60s2、QMC5883L、LCD1602组合测量磁场所需程序
  • ¥20 Win11测试yolov4,“找不到nvcuda.dll”怎么办?
  • ¥15 simulink绘制bode图
  • ¥15 php_network_getaddresses: getaddrinfo failed: Name or service not known
  • ¥15 用msg发消息出现的问题