Reputation: 6647
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:
base64
data.post_max_size
(8M
in my case, yet the base64
string plus the other data weights about 50kb
)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.
After uploading the opposite, a 38x38, 220bytes picture, it uploaded correctly.
Upvotes: 0
Views: 4805
Reputation: 316
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. ;)
Upvotes: 2
Reputation: 9724
You're saving the base64 data into a file? If so maybe the folder is not marked for "WRITE", check that.
You are using $_POST
or is using global variables in Localhost.
If you are using Global change to $_POST
.
If you are using RAW, use the variable like this:
$_GLOBALS['HTTP_RAW_POST_DATA']
Upvotes: 0