Boost Union Error

Boost Union Error

by Powlec Technology and Training -
Number of replies: 12

After update Ubuntu from 22.04 to 24.04, I get this error in the table for Boost Union plugin update.  On Mdl 4.5.

"Exception - Class "ZipArchive" not found"

Any help or pointer welcome.

TIA, Greg

Average of ratings: -
In reply to Powlec Technology and Training

Boost Union Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

ZipArchive is part of PHP's Zip extension. The most likely explanation is that you have failed to install the extension. Could be as simple as...

sudo apt install php-zip

Similar to the way that you are also missing the GD extension (https://moodle.org/mod/forum/discuss.php?d=467588) Can I suggest that you are probably posting multiple threads about what will turn out to be the same problem.... you've upgraded PHP and failed to add in the required extensions.

Average of ratings:Useful (1)
In reply to Howard Miller

Boost Union Error

by Powlec Technology and Training -
Thanks Howard, much appreciated. Have gone down that path with a partial result. The result from sudo apt install php-zip. php8.4zip exists.

# sudo apt install php-zip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package php-zip is a virtual package provided by:
php8.2-zip 8.2.28-1+ubuntu24.04.1+deb.sury.org+1
php7.4-zip 1:7.4.33-18+ubuntu24.04.1+deb.sury.org+1
php8.3-zip 8.3.6-0ubuntu0.24.04.4
You should explicitly select one to install.

E: Package 'php-zip' has no installation candidate

php8.4 was installed as part of the Unbutu OS up from 22.04 to 24.04 and no package is the result

sudo apt install php8.4-zip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.4-zip
E: Couldn't find any package by glob 'php8.4-zip'
In reply to Powlec Technology and Training

Boost Union Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ubuntu 24.04 (as far as I can tell) natively supports PHP 8.3, not 8.4. Why not just use 8.3 and make your life easier?

How did you add the repo for 8.4 (if you did)?
Average of ratings:Useful (1)
In reply to Howard Miller

Boost Union Error

by Powlec Technology and Training -
Thanks, Howard.

Why not just use 8.3 and make your life easier?
php version
---------------
# php -v
PHP 8.2.28 (cli) (built: Mar 13 2025 18:13:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.28, Copyright (c) Zend Technologies
with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies
------------------

However, f I don't put this in Apache, Mdl breaks.
----------------
    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
        # 
        SetHandler "proxy:unix:/run/php/php8.4-fpm.sock|fcgi://localhost"
    </FilesMatch>
-----------------
 
Please flesh out your comment "How did you add the repo for 8.4 (if you did)?"
Contents of ubuntu.sources:
-------
# => https://askubuntu.com/questions/1512042/ubuntu-24-04-getting-error-you-must-put-some-deb-src-uris-in-your-sources-list
#
Types: deb-src
URIs: http://us.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
#
Types: deb deb-src
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
-----------------

Thank you.
In reply to Powlec Technology and Training

Boost Union Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm lost - you said, "php8.4 was installed as part of the Unbutu OS up from 22.04 to 24.04 and no package is the result". Was it installed, how was it?

Remember, 'php -v' tells you the version of PHP *CLI*. There's no reason for CLI to be the same version as php-fpm, so that's mostly irrelevant. 
 
The native version of PHP should work with Apache, "out of the box" with little or no configuration. So, again, what have you done (and why)?

So, I suspect a bit of a mess here sad
In reply to Howard Miller

Boost Union Error

by Powlec Technology and Training -
Thanks once again.

This may be where the problem lies "There's no reason for CLI to be the same version as php-fpm, so that's mostly irrelevant" Are you able to assist further here?

Apache is running well, other than for Mdl. I have a standard conf file that has not been a problem until now. I needed to add the extra lines so Mdl would run with php8.2 being the active php version.

Unbutu OS up from 22.04 to 24.04 and no package is the result". Was it installed, how was it, The OS upgrade went well, other than an issue with Grub. However that was overcome and now all is well. The install was done at the cmd line using sudo do-release-upgrade.

Mdl 4.5 was running smoothly until I upgrade OS to Ubuntu from 22.04 to 24.04. I didn't change any configs before or after the upgrade. Mdl makes it clear that php8.2 is the required version so I used sudo update-alternatives --set php /usr/bin/php8.2 to change to php8.2 as php8.4 installs with the OS upgrade.

ATM, Mdl 4.5 is running fine, but I have errors in the background. And therefor I'm not able to do any admin tasks. See "PHP Issues when going into maintenance mode" post.

Thank you.
In reply to Powlec Technology and Training

Boost Union Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
php-cli and php-fpm are completely separate. If you install php in Ubuntu, you get both. But you don't have to. If you've done anything different then you definitely can't rely on 'php -v' at the command line to tell you what version of PHP you are running. You need to look at PHP Info within your Moodle site (or create a test script).

I'm not a fan of upgrading Ubuntu server. I always recommend creating a new instance from scratch and reloading your site from a backup. It's usually quicker and more reliable in the end. As you might be finding out.
In reply to Howard Miller

Boost Union Error

by Ken Task -
Picture of Particularly helpful Moodlers

@Howard ... guess I'll defer to you when it comes to installing PHP on Ubuntu ... package manager on Rocky 9 (dnf) doesn't behave like apt-get.

But am in 100% agreement with:

"I'm not a fan of upgrading Ubuntu server. I always recommend creating a new instance from scratch and reloading your site from a backup. It's usually quicker and more reliable in the end. As you might be finding out."

I had that very un-pleasant experience a couple of years ago with an older version of Ubuntu - server drop shipped to me for the purpose of extracting just the course backups from the site.  The in place upgrade whacked networking - spent about 3 weeks completing what normally takes minutes.

I was thinking about suggesting to the OP .... 'start over' and 'start new server build'! But, as is the case like this, many times there are no backups ... site backups or course backups. :|

'SoS', Ken

In reply to Ken Task

Boost Union Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It sometimes "just works" but when it doesn't it can be a nightmare.

PHP has always been something of a side issue. I have had such bad times upgrading MySQL that I don't even try any more. Strictly, complete backup and start again. Generally straightforward, all done in a few hours and you know exactly where you are.
In reply to Howard Miller

Boost Union Error

by Powlec Technology and Training -

Thanks, Howard.  Yes, I'm considering starting from scratch, and agree upgrades can be painful.  

However, the server not only hosts a Mdl site, but also, Apache, Ngnix, Magento, iRedMail, Postfix etc, Fail2Ban, ClamAv, Amavis, and all the others bits and pieces, Roundcube, and a couple of other HTML websites.  None of the apps are busy, so it's manageable.  To restore all that from scratch is a big task... 

For now, I'm going to persevere with resolving the php issues, due to above.

I have made some progress, on the other post I put up, that you commented on.  It appears the PPA from AndreJ was the issue with libgd3 being held back and causing conflicts.  I'm now past that and trying to resolve the PHP issues with the version 8.4 coming with the Ubuntu 24.04 and the 8.2 that Moodle wants.

Mind you, I went down this path because I found it too difficult to upgrade MariaDB on Ubuntu 22.04 from 10.4 to 10.11 that Mdl needs.  If that wasnt the case, I'd not have gone with the OS upgrade.

Pleasingly now I can put this and receive a positive return with regard to libgd3.

--------

# sudo apt policy libgd3
libgd3:
  Installed: 2.3.3-9+ubuntu20.04.1+deb.sury.org+1
  Candidate: 2.3.3-9+ubuntu20.04.1+deb.sury.org+1
  Version table:
 *** 2.3.3-9+ubuntu20.04.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status

----------

Now I've got MariaDB upgraded, I need to figure out how to force Mdl to use php8.2, and I believe my problem will be solved.  I don't need php8.4 at all, but it's part of the OS, so I probably need to leave it.  Magento happily runs on php7.4, so there must be a way.

Thanks for your input, much appreciated.

In reply to Powlec Technology and Training

Boost Union Error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I appreciate that it's an extra layer of hassle... but if you are running loads of small things on a server then I would have a serious think about containers (e.g. Docker). Despite appearances, I'm not some crazed Docker evangelist but for some use-cases it's a life saver. Running up things like LAMP stacks (once you have it working the first time) becomes trivial - as does moving them around.
Average of ratings:Useful (2)
In reply to Howard Miller

Boost Union Error

by Powlec Technology and Training -

Ok, thanks.  I'm not familiar with Docker or how it works.  I'll have a look around.  See if there's some YouTube on it, to get an overview.  

Cheers.