|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-04-09 09:34 UTC] maggus dot staab at googlemail dot com
Description: ------------ stream_copy_to_stream() expects the 3rd arg to be a integer which limits its max value on 32 bit builds. This means some real world use cases dont work because the MAX_INT is not big enough to handle 4GB+ filesizes. Could we handle the arg like a string to support "huge files" on 32 bit php? https://github.com/nextcloud/server/issues/1707#issuecomment-288890497 Expected result: ---------------- Copy of streams with filesize >= 4gb should be supported Actual result: -------------- stream_copy_to_stream() expects parameter 3 to be integer, string PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
As userland workaround exists for this exists I guess a builtin handling of such files would/should also work? ------- Quote: Got it working with following patch: /www/nextcloud/3rdparty/sabre/http/lib/Sapi.php@78: while (!feof($body)) { // stream_copy_to_stream($body, $output, $contentLength); fwrite($output,fread($body,8192)); } Instead of copying entire file at once, it copies chunks of 8MB Bit crude, but the concept works :) Based on: http://php.net/manual/en/function.stream-copy-to-stream.php#98119 ---------- See https://github.com/nextcloud/server/issues/1707#issuecomment-288890497