'Different POST request size allowed for domain and server path
I have a sub-folder on my server (let's say DOMAIN_FOLDER) and inside it I have a folder (SUBFOLDER) with my simple client - server app. Client sends some amount of data using ajax POST method and server side shows that data. For client I use file client.php. I also have a registered domain pointing to DOMAIN_FOLDER let's call it mydomain.simple. I do two requests:
https://myorignalservername/DOMAIN_FOLDER/SUBFOLDER/client.php
and
https://mydomain.simple/SUBFOLDER/client.php
Both requests run the same code, page is open, I can send request but the result of what server side shows is different with larger amount of data. When request is larger than 16383 bytes second option with mydomain.simple is showing empty $_POST data:
array(0) { }
file_get_contents("php://input") also shows nothing.
Part of jQuery script used in client.php file where ajax is created ('current' is data in JSON format):
request = $.ajax({
type: "POST",
url: "server.php",
data: current,
dataType: "json",
success: function(data)
{
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
alert('Error ' + errorThrown + "\n");
}
});
server.php file:
<?php
var_dump($_POST);
?>
I do not have php.ini file. phpinfo shows:
post_max_size 64M
max_input_vars 1000
memory_limit 256M
What could be the reason of that?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
