PHP 8.0.x not PHP 8.1 on Alma 9

We have a special use case where we need AlmaLinux 9 to use PHP 8.0.x and not PHP 8.1.x

Is there a method available that I can use to revert to PHP 8.0.x? Perhaps install an older repo and uninstall the PHP 8.1 that is trying to install by default?

Did the update truly install the 8.1 packages?

I thought that the 8.1 is a stream and has to be explicitly enabled before the packages even show for install.

I for certain see only the 8.0 with dnf list php\* and:

# dnf -q module list php
AlmaLinux 9 - x86_64 - AppStream - SBL
Name                Stream                Profiles                                  Summary
php                 8.1                   common [d], devel, minimal                PHP scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Not [e]nabled.

Thank you. I was very mistaken. But I see the error of my ways.

I do have a follow up question which is:
Is there any method where I can downgrade openssl from version 3.0.1 to version 1.1.1?
I know this is a strange request however we have a unique use case where we have PHP 8 but need to be on the older version of openssl.

Downgrade? Definitely not.

The question is, is it possible to second copy (of library, I presume), preferably in non-standard location and application that is built to use that copy?

Probably, but not from RPM packages.

Use Alma 8.7 for such usage

1 Like

Unfortunately in our specific situation the AlmaLinux has already been upgraded to version 9. Is there any possibility of configuring PHP 8 to use OpenSSL 1.1.1? Even if in this case both versions of OpenSSL coexisted on the same machine?

Not possible.

At least using RPM.

You can probably rebuild from sources, but you will have to rebuild mostly everything (as any library used by PHP and using OpenSSL may result in both versions being loaded, and will probably crash the system)

BTW, why do you think you need OpenSSL 1 ?
For legacy algorithms, a simple configuration will allow to enable them (see the update-crypto-policies command)

The issue at hand is that we need this instance of Alma to connect to a Microsoft SQL Server 2014 database.

The error we are receiving is as follows when trying to make the connection:
SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]TCP Provider: Error code 0x2746

Unfortunately the SQL Server cannot be upgraded to version 2016.

There are a lot of pages from Google that discuss various methods of conquering this error: 0x2746

One of which we latched on to particularly due to the answer being that the person downgraded to openssl 1.1.1, granted, they were doing all this in a docker container and that is not our use case, but we had hoped it was possible.

Perhaps we need to regroup and go a different route?

so, worth a try:

update-crypto-policies --set LEGACY

1 Like

Apparently this has already been tried without success. Is there any other avenue we could go?