简体   繁体   English

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

[英]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. 我有一个使用Virtualmin管理面板的ubuntu服务器,该服务器托管着Prestashop电子商务网站。

I am getting this error when trying to perform some Prestashop operations: 尝试执行一些Prestashop操作时出现此错误:

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. Virtualmin提供了3个php.ini文件进行编辑,在所有这3个文件中,我都将该值编辑为9999。仔细检查以确保它们已保存并保存。 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. 其他帖子的建议则建议将php.ini或php5.ini文件直接放置到publichtml和Prestashop管理目录中。 Added them there, restarted server, still set to 1000. 在此处添加它们,重新启动服务器,但仍设置为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. 从其他建议中,我安装了phpinfo()脚本(如果需要,可以在这里查看-http://zamozuan.com/phpinfo.php ),其中也显示1000。

That file lists /etc/php5/cgi as config file path, and loaded config file: /home/zamozuan/etc/php5/php.ini. 该文件将/ etc / php5 / cgi列为配置文件路径,并加载了配置文件:/home/zamozuan/etc/php5/php.ini。 I made sure the ini's at those locations were edited, restarted... still no luck. 我确保在那些位置的ini已被编辑,重新启动...仍然没有运气。

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. 其他建议是将.htaccess文件与“ php_value max_input_vars 9999”一起使用...再次尝试此操作(在建议的各个位置)...不走运。

Some other suggestions said it may be overwritten by.... suhosin? 其他一些建议说它可能被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... 似乎max_input_vars正在被其他内容覆盖,我不知道该怎么办...如果它来自virtualmin本身,Prestashop中的某个内容,某个地方的一些随机ini文件...不知道该怎么做...

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. 创建一个php文件并添加它。 It will find the php.ini and should grep for the max_inpiut_vars 它将找到php.ini,并应为max_inpiut_vars grep

<?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';
}
?>  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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