Jump to content

problem with number of $_POST items (not size!)


KathyBerman

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.