KathyBerman Posted April 29, 2012 Share Posted April 29, 2012 I have a problem that occurred only recently, apparently by some change my webhost made on the server. Some time ago I wrote a script that simulates a Poedit-type editor. The script has about 1500 textareas (the translation fields) with unique names, dynamically generated. All worked fine. Now suddenly I get errors (see below) when I use more than 1000 textareas. It is not a problem of $_POST size, if happens also with empty textareas. I will show here a simple php test file that I called testta.php, which creates the same error as my much more complicated real script: <?php if(isset($_POST['test'])) { echo 'The textareas were posted successfully!<br>'; } $max = 1500; echo '<form action="testta.php" method="POST">'; echo '<input type="submit" name="test" value="Submit"><br>'; for($i=0; $i < $max; $i++) { echo '<textarea name="test'.$i.'">name is test'.$i.'</textarea><br>'; } echo '</form>'; ?> The error message generated in the browser: 500 Server Error: A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again. From the Apache log file: [sat Apr 28 12:47:48 2012] [error] [client 93.172.175.50] Premature end of script headers: testta.php, referer: http://****/*****/testta.php (stars added for privacy) When $max is set to a number < 1000 it works. On the web I have only found answers that deal with max size of posts, but as I mentioned that is not my case. My webhost can't help me out either. Until last Friday all worked fine. Does anyone know what server setting could create this problem? Thanks in advance, Kathy Quote Link to comment https://forums.phpfreaks.com/topic/261791-problem-with-number-of-_post-items-not-size/ Share on other sites More sharing options...
KathyBerman Posted April 29, 2012 Author Share Posted April 29, 2012 Oops, phpinfo() is a great thing.... Setting max_input_vars = 2000 in php.ini solved my problems. Kathy Quote Link to comment https://forums.phpfreaks.com/topic/261791-problem-with-number-of-_post-items-not-size/#findComment-1341514 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.