Nasty surprise that PHP is not compiled to support large files and 64-bit addressing, which effectively limits fopen to 4GB or less. This immediately breaks functionality in applications, such as Nextcloud, from being able to serve files over that limit.
A simple fix is to change the CPPFLAGS in the PKGBUILD.
$this->bbcode_second_pass_code('', ' build() {
# http://site.icu-project.org/download/61#TOC-Migration-Issues
- CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
+ CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1'
local _phpconfig="--srcdir=../${pkgbase}-${pkgver} \
--config-cache \
"')
Or, perhaps these should go into the makepkg.conf defaults?
Either way, it would be nice to get this added so that PHP doesn't have to be manually recompiled every time it gets an update.
I assume the PKGBUILD is just coming from upstream with the only change for the ARM platforms being a change to the allowed architecture. I didn't find a PHP package in the git repo, otherwise I'd have submitted a patch.
FYI, I also found an unanswered forum post from October 2019 with the same basic info https://archlinuxarm.org/forum/viewtopic.php?f=15&t=14070&p=62441&hilit=CPPFLAGS#p62441