Php 8.1 support

This may be a silly question, but doesn't the Litespeed add support for the latest php automatically?
I have a CentOS v7.9.2009 system with WHM v4.1.10.1 plugin, running 6.0.12 version of LiteSpeed Webserver.

The problem started with Magento 2 update to 2.4.4, which officially supports php 8.1, but runs fine with php 7.4 and 8.0 on my server.
Whenever I change the php to 8.1 from the cPanel MultiPHP manager, the site crashes with error "Error: Undefined constant "Magento\Framework\Encryption\Adapter\SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES", similarly to this:

I have the latest libsodium installed and to that end everything should be fine, so I started looking into LiteSpeed settings.
In the "Compile PHP" the version 8 seems to be at version 8.0.11 and there is no 8.1.* versions available at all, like in the screenshot.

Do I need to manually add support for the 8.1--> versions?



Well-Known Member
Do I need to manually add support for the 8.1--> versions?
No, if you have WHM/cPanel there is nothing to do, but check if PHP 8.1 is available|selected in EA4. The selection in WebAdmin console is for if you have no control panel. It seems Magento 2 is not completely ready for PHP 8.1?!
Yes, I have the PHP 8.1 available & selected in EA4 and the libsodium extension installed.
Magento 2.4.4 version was released in April this year and there's only a couple of discussions regarding this problem with PHP 8.1, so I assume over 90% of instances are running fine --> the problem must be somewhere in my setup.
I'll keep looking and update once I have this figured out.
Mach das, von Bayern nach Bayern. ;)
:)D Ich bin zwar Finne, aber diesen Spitznamen mag ich seit den Jahren, in denen ich in Bayern gelebt habe.)

Got it figured out, the libsodium was not properly installed for PHP 8.1.
It showed as "installed" in EA4 extensions, but with phpinfo it did not show up when PHP 8.1 was selected.
I removed it from EA4 extensions and re-installed it, now it shows up correctly & the page loads.