incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Weber <>
Subject [zeta-dev] Bug with Webdav + Bugfix
Date Wed, 30 Mar 2011 12:40:43 GMT
  Hi all.

I wanted to open a Bug at the issue tracker but at some reasons i didn't 
receive any registration mail.
So I'm wirting here. I hope that someone can help me to post my issue 
and the fix in a correct way or better do it for me.

The Problem:
On my work with the Webdav component i figured out that every php script 
using with component crashs with file uploads larger than 1GB.  After 
some server tweaking it was clear that there must be a reason in the 
component code.
I traced the code and found a line like this "  $properties['body'] = 
$body  ".
Then it was clear. A string with 1GB was copied into an array and 
crashes the php module with this operation.

The workaround:
To avoid large memory usage I went over to use the php tempory storage. 
So the maximum amout of used ram is at my configuration 2MB and the rest 
is streamed to disk. To make working with it easier I wrote a wrapper 
clase and placed it on every part that is reading or writeing the 
document body. Luckily this is only neccessary at 
Webdav/src/transport.php and all of my own files.
As the wrapper could also be used with other components its located at Base.

There is one new file:  Base/src/streambuffer.php
And two modified:       Webdav/src/transport.php

A patch file for base and one for webdav are attached. I hope they have 
the right format.

Regards Chriss

HDPnet GmbH
Erwin-Rohde-Str. 18
69120 Heidelberg

Geschaeftsfuehrer: Marc Hermann
Registergericht: Mannheim HRB 337012
Sitz: Heidelberg
Umsatzsteuer ID Nr.: DE 211 257 470

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.
View raw message