logsI have a working Android app which sends the following details to a PHP webserver using JSON
"PhoneNumber"
"ContactName"
"CallType"
"CallDate"
"CallDuration"
My app fetches all this detials fine and the php webserver is able to parse and put it into the database as well .
Php parse:
foreach ( $json_output->CallDetails as $contact )
{
$phonenum = $contact->PhoneNumber;
$contactnum = $contact->ContactName;
$calltype = $contact->CallType;
$calldate = $contact->CallDate;
$callduration = $contact->CallDuration;
// Insert into database
}
When i try to send say 10 Contact details from the phone to the webserver then things work fine . However if i try to send the entire phone logs ( which you can guess can be quite huge 3 ) then nothing gets added to the database .
Hence i assume i am breaching some limit either a JSON sending side limit or PHP reciever side limit . Anyone knows what it is ?
Can someone suggest a workaround . I really dont want to send my JSON data in short bursts of smaller size .
More than likely, the data being sent via POST is too large for the server to handle. You will need to increase the maximum post size by adding it to your php.ini
or .htaccess
file.
.htaccess example:
php_value upload_max_filesize 20M
php_value post_max_size 20M
Update: Upon inspection of your phpinfo
, it appears that your current service provider is limiting the post_max_size
to 8M
.