以下是報錯訊息
PHP Warning: Unknown: Input variables exceeded 4000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0
?後來我給轉到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 into stderr: "NOTICE: PHP message: PHP Warning: Unknown: Input into stderr: "NOTICE: PHP message: PHP Warning: Unknown: Input into stderr: "NOTICE: PHP message: PHP Warning: Unknown: Input into stder excet. in php.ini. in Unknown on line 0"
1 |
201415: 19:30]WARNING:[ 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"超過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 seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data max_input_vars = 2000 1 | 2
execution time
of
script
, in
|
;
Maximum amount of timeeachscript may spend parsing request datamax_input_vars=2000 ?看日誌很重要 以上就介紹了PHP Warning之max_input_vars,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。 |