Could you please provide more information about your server? Right now we actually now nothing.
Please provide information about used software and software versions (web server, PHP, Nextcloud, PHP-fpm?).
Furthermore we definitely need logs! Please provide nextcloud.log, web server logs (including error log) and probably system logs.
Could you search for any php.ini on your server? Environment variables containing PHP could be usefully maybe.