Closed tacerus closed 3 years ago
EDIT: Seems to only be an issue in PHP 8. Using DNS UI with a PHP 7 FPM server, the issue does not exist, and the default memory_limit suffices.
It definitely shouldn't need a gigabyte to import a 30 record zone. Seems like it must be stuck in an infinite loop to reach that kind of level.
Ye, on PHP7 it works fine with a limit of 256M.
PHP 8.0 changed the type of mb_strcut when there is nothing left.
Changing line 364 in core.php should fix it, please try.
from:
while($content !== false) {
to:
while(mb_strlen($content) != 0) {
Thank you for identifying the problem and providing a fix. I've pushed a commit with this fix in now.
Thank you so much, @nhulsch!
Hi,
I already increased the memory limit in my PHP 8 FPM server to 1024M, but trying to export a zone with about 30 records still exhausts it:
<b>Fatal error</b>: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 536870920 bytes) in <b>/path/to/my/webroot/dnsui1/core.php</b> on line <b>367</b><br />
Is this expected? I feel like this might be a memory leak, however am not good enough with PHP code to investigate.
Cheers Georg