I believe the problem is caused by this code at Code Line: 927: @mkdir($updraft_dir.'/binziptest/subdir1/subdir2', 0777, true);
. The reason I believe that could be the problem is that some hosts do not allow 777 permissions at any time and if you try to use 777 permissions for a folder’s permission then the host server will automatically block/deny access to that folder. That could also be the reason for the 500 Internal server error occurring or your server could be crashing. You could test that theory by editing/modifying this code at Code Line 927: @mkdir($updraft_dir.'/binziptest/subdir1/subdir2', 0777, true);
and changing it to this code: @mkdir($updraft_dir.'/binziptest/subdir1/subdir2', 0755, true);
Or of course the php error is secondary and your server is crashing with a 500 error during the UpdraftPlus backup process for whatever reason and automatically reboots itself and the php error that you are seeing is after the fact of that server crash. The issue/problem would be an issue/problem between UpdraftPlus and your server and not related to BPS, WordPress or any of your other plugins.
I assume UpdraftPlus allows you to choose options that would allow you to NOT use popen or any of this code and use an alternative method. You would need to ask the UpdraftPlus folks which option setting that would be in UpdraftPlus.
Code lines: 925-951 in File: /updraftplus/class-updraftplus.php.
# Test it, see if it is compatible with Info-ZIP # If you have another kind of zip, then feel free to tell me about it @mkdir($updraft_dir.'/binziptest/subdir1/subdir2', 0777, true); file_put_contents($updraft_dir.'/binziptest/subdir1/subdir2/test.html', '<html></body><a href="https://updraftplus.com">UpdraftPlus is a great backup and restoration plugin for WordPress.</body></html>'); @unlink($updraft_dir.'/binziptest/test.zip'); if (is_file($updraft_dir.'/binziptest/subdir1/subdir2/test.html')) { $exec = "cd ".escapeshellarg($updraft_dir)."; $potzip"; if (defined('UPDRAFTPLUS_BINZIP_OPTS') && UPDRAFTPLUS_BINZIP_OPTS) $exec .= ' '.UPDRAFTPLUS_BINZIP_OPTS; $exec .= " -v -u -r binziptest/test.zip binziptest/subdir1"; $all_ok=true; $handle = popen($exec, "r"); if ($handle) { while (!feof($handle)) { $w = fgets($handle); if ($w && $logit) $this->log("Output: ".trim($w)); } $ret = pclose($handle); if ($ret !=0) { if ($logit) $this->log("Binary zip: error (code: $ret)"); $all_ok = false; } } else { if ($logit) $this->log("Error: popen failed"); $all_ok = false; }