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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.