I have a couple of image drop places made with html5. When the image is parsed and converted to data (and encoded in base64), I grab that data and send via post to a php file.
On localhost, that base64 string is received perfectly in the php file. However, when I move to a server, both image preprocessing and base64 sending to the server work (I read the headers), but when in the php file, that base64 string is no longer there. Is there anything I am missing?
Some extra information:
- I don’t url encode the string, because without doing so it worked locally, and doing that the server still doesn’t get the
base64data. - I haven’t topped the
post_max_size(8Min my case, yet thebase64string plus the other data weights about50kb)
Breaking news
I tried to upload 600kb of data. Now the server prompts this:
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource<br />/altmail/admin/calls/ajax.previewnewsletter.php<br />
does not allow request data with POST requests, or the amount of data provided in
the request exceeds the capacity limit.
</body></html>
Again, post_max_size is big enough.
Breaking news 2
After uploading the opposite, a 38×38, 220bytes picture, it uploaded correctly.
Check the Apache Request size limits:
http://httpd.apache.org/docs/2.2/mod/core.html#LimitRequestFieldSize
There is a limit in the size of everything where it comes to HTTP, so if something works here and not there, increase the sizes there. 😉