Post a sample of your code which do the upload.
Without seeing what you did and how it is hard to give advices.
Ok, you´re right. Now this is what I´d do in the past because that´s the only way I could get it to work:
postmessagejob.poststring (MainURL & "post_message.php?" & parametervalues,"")
Which would always work - up till the before mentioned size limit on server side.
But right now I just started to think that perhaps if I did it in the recommended way:
postmessagejob.poststring (MainURL & "post_message.php" ,parametervalues)
.. I´m one step closer to something that´ll work.
But not there yet. I just tried this, both with and without "?" after .php, and I can see that nothing is happening to the mysql table where data should be inserted as they would with the first method mentioned. No error code given either.
Hence, I checked in my network monitor, and this is what I see in the first packet:
POST /php/post_message.php HTTP/1.1..Content-Length: 265..Content-Type: application/x-www-form-urlencoded..Host: www(removed).com..Connection: Keep-Alive....
And then a new packet arrives with the rest:
usernametmp=xx&passwordtmp=xx&jsonarray=[%7B%22timestamp%22:%222017-02-02%2010:53:29%22,%22sender%22:%22yy%22,%22message%22:%22jiojjojo%22,%22attachment%22:null,%22threadid%22:%2292204805202022017235329%22,%22msgtype%22:%220%22,%22subject%22:%22%22%7D]
So when using this method, the server does not seem to understand that the next packet contains data which is part of the first packet.
Do you think I´m right that this would be working, and do you know if there´s a way to construct the posted data so that the server will know to "glue" the packets?
EDIT: Ok, so after playing around with this for a bit, I found some other threads telling that when using the method where URL and data is separated, you´ll have to use php://input on the server side. Hence, I checked my script and now I have modified it to include two different ways of displaying the input - just in case:
$json = file_get_contents("php://input");
echo $json;
$fp = fopen("php://input", 'r+');
while (!feof($fp)) {
$contents .= fread($fp, 8192);
}
fclose($fp);
echo $contents;
But nothing shows up, and I´ve already checked in php.ini that I have allow_url_fopen = On.
EDIT AGAIN:
I think it´s resolved now! always_populate_raw_post_data = On had to be set in php.ini. Gonna check if big messages can get through now and let you know.
Thanks!
Final EDIT: I went for your multipart solution and found that it did the job perfectly!