6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
8/18/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#14086] Image Attachments via ActiveSync: Last Byte Missing?
*
Your Email Address
*
Spam protection
Enter the letters below:
. .. ..___.. .. . |\ ||_/ | | || | | \|| \ | |/\||__|
Comment
> To get ahead of the "I can't upgrade PHP" and "this is the version > that comes with <insert some distro here>" comments that always come > after a bug like this, I should say we won't work around this in code > since it would require holding the entire attachment in memory, thus > negating just about all of the work we do to minimize memory usage by > using streams. This could also very well hit your local php memory > limit. > > HOWEVER, if someone wants to work around this locally on their own > install knowing the consequences of doing so, what you need to do is > modify > Horde_ActiveSync_Message_AirSyncBaseFileAttachment::_checkEncoding() > method to pull the stream contents into memory, perform a > base64_encode() on them, and then write it back out to another stream > to return: So replace the inner block in that method with something > like this: > > if (is_resource($data)) { > rewind($data); > $temp_data = stream_get_contents($data); > $data = fopen('php://temp/', 'r+'); > fwrite($data, base64_encode($temp_data)); > } else { > $data = base64_encode($data); > } > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers