Tuesday, August 30, 2022

[SOLVED] RedHat Software collections and php72 and dblib

Issue

I am trying to use php72 on a Centos7 box via Red Hat Software Collections. Everything else seems to be working, but I can't get a connection to SQL Server database via dblib. Earlier I have used remi (on another server) but RHSC seemed somehow more trustworthy.

I thought the package with dblib should be rh-php72-php-pdo-dblib but there isn't that package. I have tried to search all around but nothing helpful surfaced. Am I the only one trying to use that combination or what?

wbr hank


Solution

I thought the package with dblib should be rh-php72-php-pdo-dblib but there isn't that package.

Indeed rh-php72-php-pdo-dblib doesn't exists on official Red Hat Software Collections, because it depends on freetds library which is not available on RHEL.

For now, my repository is the only solution.

I also recommend you to read Microsoft SQL Server from PHP

Using pdo_sqlsrv (using Microsoft library) can be a better solution than pdo_dblib (using freetds).

RHSCL seemed somehow more trustworthy.

Indeed, RHSCL is an official Red Hat supported product, while "remi" is a community driven repository, with only "best effort" support.



Answered By - Remi Collet
Answer Checked By - Marie Seifert (WPSolving Admin)