diff --git a/webmail/common.php b/webmail/common.php index 10b2030..d7d2436 100644 --- a/webmail/common.php +++ b/webmail/common.php @@ -11,7 +11,7 @@ * * @package NOCC * @license http://www.gnu.org/licenses/ GNU General Public License - * @version SVN: $Id: common.php 3070 2023-03-11 12:33:25Z oheil $ + * @version SVN: $Id: common.php 3075 2023-03-15 09:14:06Z oheil $ */ define('NOCC_DEBUG_LEVEL', 0); @@ -57,7 +57,7 @@ require_once './utils/crypt.php'; require_once './utils/translation.php'; $conf->nocc_name = 'NOCC'; -$conf->nocc_version = '1.9.13'; +$conf->nocc_version = '1.9.14'; $conf->nocc_url = 'http://nocc.sourceforge.net/'; $pwd_to_encrypt = false; diff --git a/webmail/docs/NEWS b/webmail/docs/NEWS index f324a99..27f87e5 100644 --- a/webmail/docs/NEWS +++ b/webmail/docs/NEWS @@ -1,10 +1,11 @@ -Latest version is 1.9.14-dev +Latest version is 1.9.14 -NOCC 1.9.14 March?????????????? +NOCC 1.9.14 March 15, 2023 Bugs * Bug #511 : Auto-Update fails with php 8.2.3 (Oliver Heil). + Creating an early release before people switch to php 8.2. Latest version is 1.9.13 diff --git a/webmail/update.php b/webmail/update.php index d473a60..b1910f7 100644 --- a/webmail/update.php +++ b/webmail/update.php @@ -325,14 +325,15 @@ else { } } echo '

Compressing archive: '.$archive_name.'.gz

'; - //the following failes in php 8.2 with Allowed memory size exhausted + //the following fails in php 8.2 with Allowed memory size exhausted //$archive->compress(Phar::GZ); + //doing it manually: $gzfile=gzcompressfile($archive_name); unset($archive); echo '

Removing file: '.$archive_name.'

'; Phar::unlinkArchive($archive_name); - $archive_name=gzdecompress($gzfile); + $archive_name=gzdecompressfile($gzfile); $archive=new PharData($archive_name); $number_of_files_check=$archive->count(); @@ -414,10 +415,10 @@ else { $archive->close(); } else { - //the following failes in php 8.2 with Allowed memory size exhausted + //the following fails in php 8.2 with Allowed memory size exhausted //$archive=new PharData($archive_name); - - $tar_archive_name=gzdecompress($archive_name); + //doing it manually: + $tar_archive_name=gzdecompressfile($archive_name); $archive=new PharData($tar_archive_name); $archive->extractTo('.'); @@ -553,7 +554,7 @@ function gzcompressfile(string $inFilename, int $level = 9): string return $gzFilename; } // https://stackoverflow.com/questions/3293121/how-can-i-unzip-a-gz-file-with-php -function gzdecompress(string $file_name): string +function gzdecompressfile(string $file_name): string { // Raising this value may increase performance $buffer_size = 4096; // read 4kb at a time