如何修复 Nextcloud updater PHP Fatal error: Allowed memory size of ... bytes exhausted
问题:
尝试使用命令行(例如 SSH)通过类似以下命令更新 Nextcloud 时
nextcloud_updater.sh
php updater/updater.phar你看到包含 PHP Fatal error: Allowed memory size of ... bytes exhausted 的错误消息,例如:
[…existing code…]
nextcloud_updater_error_output.txt
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[ ] Verify integrity ...PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 155061456 bytes) in phar:///owncloud.mydomain.com/updater/updater.phar/lib/Updater.php on line 637解决方案
首先,尝试在虚拟主机面板或 php.ini 中调整内存限制。如果这不可能 - 例如对于我的主机商,FastCGI PHP 和命令行 (CLI) PHP 有不同的设置,你可以使用以下命令手动设置内存限制
php_memory_fix_command.sh
php -d memory_limit=512M updater/updater.pharCheck out similar posts by category:
Networking, Nextcloud, PHP
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow