22 Oct 2012, 2:15 AM
We are seeing a strange issue in our Extjs form, where when we submit the form, either $_POST variable is totally blank or some values of $_POST variable truncates (They truncate string of that variable which we pass through Ext.encode or json.stringify).

Interesting points in our issue is that it is coming intermittently and if we once get this issue but then if we do another try to submit the form with same value which we previously entered, would post form successfully.

Following are our ExtJs form structure:

var form = new Ext.FormPanel({
title : ' ',
url: 'form-submit.php',
width : 850,
style: "text-align:left",
defaults: {
layout: 'form'
show: {
fn: function(){
} } },
buttons: [
type: 'button',
listeners: {
'click': {
fn: function(evt, btn){
submitForm(form); // Inside submitForm() we are doing some stuff and then submit form using form.getForm().submit({...});
In this form we are adding each field by first making a container then add items in to that container and then add container in to main form like:

var item = new Ext.Container({
and then through form.add().

Now when we submit this form, some weird things happen to $_POST like:

Sometimes $_POST is completely empty.
Sometimes some variables truncates like suppose we have field variable which has value "[\"main_panel\",\"online\", \"hello1\",\"hello2\"] then after post it would be $_POST['fields'] = "[\"opened_main_panel\",\"online".
Sometimes out of 20-25 input fields only 5-6 fields getting posted.

Some more inputs/findings from our log file after doing some R&D :

It is happening for IE browser mostly (Not all the logs are from IE but most of them).
We have tried to check php://input at server side after posting form, but it also comes with blank value.
We are sending about 30-40 (sometime more than this) input fields from our extjs form.
We thought it might be a problem of sending large number of fields so, to check we had sent only one normal Extjs request before posting form containing only one parameter but length of that parameter is around 1000-1200 characters, but again sometimes that variable posted with blank value.
As per our knowledge POST does not depend on parameter length (which we have restriction for GET). but then also Could parameter length be a problem?

We have checked as much as php/apache settings which we were asked to check when we were going to find answer on internet (You can check this through phpinfo.php file).
We also tried to use $_REQUEST variable instead of post at server side but could not get luck on this. (Same thing empty values)
One thing we want you to notice is that our register_global is set to 'on'.
We have also checked for content type it is set to Content-Typetext/html; charset=ISO-8859-1 in our header request. we also tried to check this at our server side file like:

$type = "application/x-www-form-urlencoded";
We have also checked our keepalive setting in our config file.
We are also doing some stuff related to changing array to string by Ext.encode and YAHOO.lang.JSON.stringify().
We also thought it may be because of proxy setting but later we assumed that if it had been because of proxy setting then user can get the same issue every time but we are getting issue intermittently.

my apache/php config settings

php version 5.3.14
apache 2.0.
Extjs 3.3

max_input_time 60
max_input_var 1000
post_max_size 16M
register_globals on

Please help me to resolve this issue..

[email protected]

22 Oct 2012, 5:31 AM
What is your failure rate in other browsers? Is this just an IE issue?
Is your header data intact? I would suggest sending as JSON.

Is the failure rate related to different data, or intermittent in all cases? Is there a change you have invalid data?


You should not have to send quoted array data that may be causing issues.

If you decrease the amount of data sent (say half), does this affect the failure rate?
Can you send a large hard coded json string in a ajax request, what happens?


22 Oct 2012, 11:18 PM
Thanks for replying scott

Failure rate is very low in other browser say 1 in 20 times.

We have also tried using json.stringify() to encode and sending data.

Even if we pass a string containing 1000-1200 characters, sometimes its also posting blank, so i think its not about json or encoding..

suppose we have an array containing 5 string, then it will be "" in that array. so i think i can not do much in it.

For your last question, about decrease the length of string - Sir we have that requirement where a string can have large number of text (suppose there is a text area or editor), I think large number of char should not be a problem in POST..We can not decrease or break character string..

Please help

23 Oct 2012, 5:35 AM
Please do not post duplicate threads