PHP Warning之max_input_vars

來源:互聯網
上載者:User
以下是報錯資訊

PHP Warning: Unknown: Input variables exceeded 4000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

公司內一個php的後台管理系統,之前運行在apache上,後來我給轉到nginx+php上後,其他功能運行正常,有一個修改功能提交表單後沒有提交成功,查了代碼沒查出來什麼問題,後來看了下php error日誌,也沒有什麼線索,列印post請求後,也發現提交表單個數和正在表單個數對不上(當時懷疑過是不是某個外掛程式是不是沒裝,字元集對不對等),再看了下php-fpm的日誌,有點資訊可以參考了。

[25-Sep-2014 15:19:30] WARNING: [pool www] child 28329 said into stderr: "NOTICE: PHP message: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0"

1

[25-Sep-201415:19:30]WARNING:[pool www]child28329said into stderr:"NOTICE: PHP message: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0"

提示input 變數個數超過1000,建議修改php.ini檔案中的 max_input_vars,PHP從5.3.9開始增加一個變數 max_input_vars 用來限制提交的表單數量。

媽的,我這個功能(類似於phpmysqladmin功能,讀取資料庫表,然後能寫入編輯,然後資料庫欄位有128個,然後每個欄位有11個input框)大概有1400多個input,(多麼痛的領悟,為毛這麼吊,研發一個表搞這麼多欄位),

然後我在php.ini裡面加入

max_execution_time = 30 ; Maximum execution time of each script, in secondsmax_input_time = 60 ; Maximum amount of time each script may spend parsing request datamax_input_vars = 2000

1

2

3

max_execution_time=30 ;Maximumexecution timeof eachscript,inseconds

max_input_time=60 ;Maximumamount of timeeachscriptmay spend parsingrequest data

max_input_vars=2000

重啟php-fpm後,功能正常了。看日誌很重要

以上就介紹了PHP Warning之max_input_vars,包括了方面的內容,希望對PHP教程有興趣的朋友有所協助。

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.