php - Base64 encoded string saves incorrectly to MySQL -


i'm struggling several hours on issue.

i have long string. value base64_encoded json data. when i'm doing var_dump or saving string mysql gets cut off. saves correctly file.

this output saved file. (correct) http://pastebin.com/brr9a271

this data saved mysql blob field. (cutted). same appears when var_dump http://pastebin.com/u1xnanub

what missing? can php bug?

your file has 86kib, blob column maximum length of 65,535.
use mediumblob.

from documentation :

       type | maximum length -----------+-------------------------------------   tinyblob |           255 (2 8−1) bytes       blob |        65,535 (216−1) bytes = 64 kib mediumblob |    16,777,215 (224−1) bytes = 16 mib   longblob | 4,294,967,295 (232−1) bytes =  4 gib 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -