[PHP] Errors in log, also troubles uploading large video files

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (29.0.6): replace me
Operating system and version ( FreeBSD 13.1-RELEASE-p9): replace me
Apache or nginx version (Caddy 2.7.6): replace me
PHP version (8.3.8): replace me

The issue you are facing:
Tons of these errors. Also having troubles uploading large files. where the file will upload and at the end an unknown error occurs and there is nothing in the expected folder.
[PHP] Error: http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257
GET /s/33QG7nwf5KfZRSK/download?path=&files=
from xxx.xxx.xxx.xxx by – at Sep 12, 2024 at 10:51:23 AM

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

{"reqId":"95juEPXndZvUJB26OOq7","level":3,"time":"2024-09-12T10:51:23-05:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"},"id":"66e32d2e0f548"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '****',
    2 => '192.168.0.201',
    3 => '192.168.12.50',
  ),
  'datadirectory' => '/mnt/files',
  'dbtype' => 'mysql',
  'version' => '29.0.6.1',
  'overwrite.cli.url' => '****',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/var/run/mysql/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'Bs8aYZO0i+v6qiwi2bzYrA==',
  'installed' => true,
  'instanceid' => 'ocd6ah2h2s43',
  'logtimezone' => 'America/Winnipeg',
  'default_phone_region' => 'US',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 1,
  'logrotate_size' => '104847600',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwritehost' => '****',
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'trusted_proxies' => 
  array (
    1 => '127.0.0.1',
  ),
  'maintenance_window_start' => 5,
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'pipe',
  'mail_from_address' => 'cloud1',
  'mail_domain' => '****',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '456',
  'mail_smtpauth' => 1,
  'maintenance' => false,
  'theme' => '',
  'mail_smtpname' => '****',
  'mail_smtppassword' => '****',
  'mail_smtpsecure' => 'ssl',
);

The output of your Apache/nginx/system log in /var/log/____: Caddyfile

{
	# debug
	acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
	email *****
	# default_sni *****

	# Global timeouts for reading/writing requests to handle large uploads
	servers {
		timeouts {
			read_body 7200s # 2 hours (adjust as needed)
			write 7200s # 2 hours (adjust as needed)
		}
	}
}

***** {
	root * /usr/local/www/nextcloud
	file_server
	log {
		output file /var/log/*****
	}

	php_fastcgi 127.0.0.1:9000 {
		env front_controller_active true
		read_timeout 7200s # Time to read response from FastCGI
		write_timeout 7200s # Time to send data to FastCGI
	}

	# Increase body size limit to 1000GB for handling large file uploads
	request_body {
		max_size 1000GB
	}

	header {
		enable HSTS
		Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
	}

	# Client support (e.g., OS X calendar/contacts)
	redir /.well-known/carddav /remote.php/dav/ 301
	redir /.well-known/caldav /remote.php/dav/ 301
	redir /.well-known/webfinger /index.php/.well-known/webfinger 301
	redir /.well-known/nodeinfo /index.php/.well-known/nodeinfo 301

	# Required for legacy
	@notlegacy {
		path *.php
		not path /index*
		not path /remote*
		not path /public*
		not path /cron*
		not path /core/ajax/update*
		not path /status*
		not path /ocs/v1*
		not path /ocs/v2*
		not path /updater/*
		not path /ocs-provider/*
		not path */richdocumentscode/proxy*
	}
	rewrite @notlegacy /index.php{uri}

	# Prevent access to sensitive files and folders
	@forbidden {
		path /.htaccess
		path /data/*
		path /config/*
		path /db_structure
		path /.xml
		path /README
		path /3rdparty/*
		path /lib/*
		path /templates/*
		path /occ
		path /console.php
	}
	respond @forbidden 404
}

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"xbc5jBaLTduVgRHaay6i","level":0,"time":"2024-09-12T01:21:28-05:00","remoteAddr":"141.101.109.193","user":"Bruce","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/Bruce/web-file-upload-a2e481dbaa057ebe/947","message":"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`storage` = :dcValue1) AND (`path_hash` = :dcValue2)","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15","version":"29.0.6.1","exception":{"Exception":"Exception","Message":"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`storage` = :dcValue1) AND (`path_hash` = :dcValue2)","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":344,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`storage` = :dcValue1) AND (`path_hash` = :dcValue2)",[3,"44c0c3f5ad222a0d4c6dddf8048dc34d"],[1,2],"*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":384,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Cache/Cache.php","line":164,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/Files/Cache/HomeCache.php","line":57,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->","args":["uploads/web-file-upload-a2e481dbaa057ebe/947"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/View.php","line":1336,"function":"get","class":"OC\\Files\\Cache\\HomeCache","type":"->","args":["uploads/web-file-upload-a2e481dbaa057ebe/947"]},{"file":"/usr/local/www/nextcloud/lib/private/Files/View.php","line":1383,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->","args":[["OCA\\Files_Trashbin\\Storage","*** sensitive parameters replaced ***",["OC\\Files\\Cache\\Scanner"],"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",["OC\\Files\\Cache\\Updater"]],"uploads/web-file-upload-a2e481dbaa057ebe/947","/web-file-upload-a2e481dbaa057ebe/947"]},{"file":"/usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":215,"function":"getFileInfo","class":"OC\\Files\\View","type":"->","args":["/Bruce/uploads/web-file-upload-a2e481dbaa057ebe/947"]},{"file":"/usr/local/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":69,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["947"]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":95,"function":"getChild","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["947"]},{"file":"/usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php","line":685,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"sendFileIdHeader","class":"OCA\\DAV\\Connector\\Sabre\\FilesPlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1106,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["afterBind",["*** sensitive parameters replaced ***"]]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/dav/lib/Server.php","line":385,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/remote.php","line":172,"args":["/usr/local/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/usr/local/www/nextcloud/lib/private/DB/Connection.php","Line":320,"message":"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`storage` = :dcValue1) AND (`path_hash` = :dcValue2)","tables":["oc_filecache","oc_filecache_extended"],"reads":["oc_filecache","oc_filecache_extended","oc_files_metadata"],"exception":{},"CustomMessage":"dirty table reads: SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `filecache`.`name`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, `encrypted`, `etag`, `filecache`.`permissions`, `checksum`, `unencrypted_size`, `metadata_etag`, `creation_time`, `upload_time`, `meta`.`json` AS `meta_json`, `meta`.`sync_token` AS `meta_sync_token` FROM `*PREFIX*filecache` `filecache` LEFT JOIN `*PREFIX*filecache_extended` `fe` ON `filecache`.`fileid` = `fe`.`fileid` LEFT JOIN `*PREFIX*files_metadata` `meta` ON `filecache`.`fileid` = `meta`.`file_id` WHERE (`storage` = :dcValue1) AND (`path_hash` = :dcValue2)"}}
{"reqId":"FDYp7rDQ4wjM6pqcxHpQ","level":1,"time":"2024-09-12T01:46:41-05:00","remoteAddr":"","user":"--","app":"dav","method":"","url":"--","message":"Pruned 0 calendar sync tokens and 0 address book sync tokens","userAgent":"--","version":"29.0.6.1","data":{"app":"dav"}}
{"reqId":"dyMPQ1QaSpeMZd4ybU5l","level":3,"time":"2024-09-12T10:11:38-05:00","remoteAddr":"162.158.159.211","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"C8oiYqhMQcRFSqxNkyoR","level":3,"time":"2024-09-12T10:11:39-05:00","remoteAddr":"162.158.159.211","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"nZkUnRQKLuh2oxp4lIch","level":3,"time":"2024-09-12T10:11:39-05:00","remoteAddr":"162.158.159.211","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"9vU48ii1AdWMc4erUEJE","level":3,"time":"2024-09-12T10:11:41-05:00","remoteAddr":"162.158.159.211","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"pFb1MVPEYKujA3H2T9aW","level":3,"time":"2024-09-12T10:40:57-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"Z0OerP7UUoQQ66i7BVgK","level":3,"time":"2024-09-12T10:40:57-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"yxmpbBgJk8meDoLyKGA2","level":3,"time":"2024-09-12T10:40:59-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"8s4MHPqJ9YQpdBSEExWZ","level":3,"time":"2024-09-12T10:41:58-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"2jDn8RPKx8N5WfxeUIka","level":3,"time":"2024-09-12T10:42:45-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"QlUuG5CcKgxrrJegIYFG","level":3,"time":"2024-09-12T10:42:53-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"8YLI9wzpHcqQOcnTQdav","level":3,"time":"2024-09-12T10:42:54-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"IaqLud12b6zPPnvUH2u1","level":3,"time":"2024-09-12T10:42:56-05:00","remoteAddr":"162.158.146.28","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"xnHinBDIADITN20Gv61t","level":3,"time":"2024-09-12T10:51:21-05:00","remoteAddr":"162.158.154.253","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"NTgFNVuS2XTCGu7QX3eO","level":3,"time":"2024-09-12T10:51:21-05:00","remoteAddr":"162.158.154.253","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"95juEPXndZvUJB26OOq7","level":3,"time":"2024-09-12T10:51:23-05:00","remoteAddr":"162.158.154.253","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}
{"reqId":"sroJ4Es99rFZtkzeT9pw","level":3,"time":"2024-09-12T10:51:23-05:00","remoteAddr":"162.158.154.253","user":"--","app":"PHP","method":"GET","url":"/s/33QG7nwf5KfZRSK/download?path=&files=","message":"http_response_code(): Cannot set response code - headers already sent (output started at /usr/local/www/nextcloud/lib/private/Files/View.php:459) at /usr/local/www/nextcloud/lib/private/legacy/OC_Template.php#257","userAgent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36","version":"29.0.6.1","data":{"app":"PHP"}}

And to add to this, it’s happening using the web browser. and when the upload fails, I don’t see anything in the logs, there’s just a message "
an unknown error has occurred
Any ideas? I’ve seen similar messages posted but didn’t find any resolutions. thank you!

Since these are two separate issues, let’s focus on the uploading first. Please check your browser inspector. In particular, the Console and Network tabs during the upload attempt. They should have more clues.

P.S. The headers already sent matter seems to be this one, but it also appears you already know that. :slight_smile: [PHP] Errors in log, also troubles uploading large video files - #3 by jtr

Hi jtr, thanks for the reply and the tips. I checked the network tab in the inspector and when the upload failed I see a status code of ‘413 payload too large’. It’s strange thought that I can’t find that error anywhere in the logs. Is there a setting somewhere I’ve missed for large file uploads? my php.ini has these set already:
upload_max_filesize = 1024G
max_file_uploads = 50
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1024M
post_max_size = 1024G
upload_max_size = 1024G
Thanks - Brucifer