Re: [openupload-devel] A patch for a few things
Status: Beta
Brought to you by:
tsdogs
|
From: Alessandro B. <ts...@br...> - 2009-11-11 07:06:42
|
Austin, this is not that easy for me either :) Anyway turning off output buffering in php.ini should not be the solution. the ob_end_clean(); function right before the readfile should simply tell php to discard anything in the buffer and stop using the output buffer. So this should behave like a normal page without output buffering. I think I need some reading to check that what I state here is actually the reality. So I need to do a few tests. php.ini should be touched as less as possible. The default memory limit of 2M to me should be enough for openupload to work, but I need some testing. Thanks for the report. Alessandro Austin ha scritto: > On Tue, Nov 10, 2009 at 2:06 AM, Alessandro Briosi <ts...@br...> wrote: >> Austin, >> for the authentication I need a closer look. But what is the problem >> with readfile. It shouldn't create problems with memory as far as the >> output buffering is not enabled? > > I'll read up on output buffering. I'm not a PHP guy at all, so it's > entirely possible that I missed some obvious bit of tuning that > everyone who knows anything does when first setting up a server. > > For reference, I'm doing this development/testing work on a CentOS 5 > machine, with PHP 5.2.11 installed from a 3rd party repository. > > snippits of php.ini > output_buffering = 4096 # this would be the problem then :) > memory_limit = 32M > >> There was a bug in php 4.3 but it should be ok with php 5.x >> Maybe trying to close the session would solve your memory problems (?) >> >> Actually readfile should just do what your code does. > > After some reading, I turned output_buffering off, and it all worked. > Thanks for the tip. I was trying to turn it off just in the serveFile > function with the ini_set function, but that approach didn't seem to > work (it's entirely possible I was missing some vital piece of > documentation or something). > > So, please disregard the piece of the patch that contains the readfile > stuff. Or I can generate a new patch, whichever is easier for you. > > Perhaps it should be documented to make sure output buffering is off > when running this? > > cheers, > Austin. > >> Alessandro >> >> Austin ha scritto: >>> Hello all, >>> >>> I'm looking at deploying this software at work, and have done some >>> preliminary development work to verify that we'd be able to use it. >>> >>> I needed to write a new authentication backend to work with our >>> Siteminder single-sign-on stuff, and a patch to make sending the files >>> to clients not consume as much ram as the file is large. I also added >>> a config option to allow the remote IP address to be gathered from a >>> different header than normal. I'm attaching a patch for all three of >>> those things together. I can split it up, if desired. >>> >>> The other thing that I am wanting to deploy is the "invitation" >>> feature that someone was talking about on this list a few months ago. >>> I'm wondering if any progress has been made writing this? If not, I'm >>> happy to start help tackling it. I've taken a look at doing it >>> already, and have an idea of how I might go about implementing it, but >>> would like some guidance from someone who knows the codeabase (and >>> PHP) better than I. >>> >>> My plan is to have our corporate users be able to upload files, anyone >>> be able to download files, and non-corporate people be able to upload >>> files by invitation. >>> >>> Cheers, >>> Austin. >>> >>> >>> ------------------------------------------------------------------------ >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>> trial. Simplify your report design, integration and deployment - and focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Openupload-devel mailing list >>> Ope...@li... >>> https://lists.sourceforge.net/lists/listinfo/openupload-devel >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Openupload-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openupload-devel >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Openupload-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openupload-devel |