Xampp on rhel8 or rocky with Msodbcsql17 error.

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Xampp on rhel8 or rocky with Msodbcsql17 error.

Postby heberv » 10. February 2022 14:05

Hi I'm trying to connect xampp with msodbcsql17. I test with all xampp versions 7.4, 8.0 and 8.1, and in all of them the error message is:

Connection could not be established.
Array ( [0] => Array ( [0] => 01000 [SQLSTATE] => 01000 [1] => 0 [code] => 0 [2] => [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.2' : file not found [message] => [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.2' : file not found ) )

The steps that I previously use in Centos 7 is:

curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/mssql-release.repo
dnf -y remove unixODBC-utf16 unixODBC-utf16-devel
ACCEPT_EULA=Y dnf -y install msodbcsql #msodbcsql17 mssql-tools # Centos 7 work with msodbcsql 13
dnf -y install unixODBC-devel gcc-c++ gcc autoconf automake
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

mv /opt/lampp/lib/libstdc++.so.6 /opt/lampp/lib/libstdc++.so.6.orig
# ln -s /usr/lib64/libstdc++.so.6.0.25 /opt/lampp/lib/libstdc++.so.6 #use with centos 8

cd /opt/lampp/bin/

./pecl download sqlsrv
./pecl download pdo_sqlsrv

tar xfvz sqlsrv-5.10.0.tgz
tar xfvz pdo_sqlsrv-5.10.0.tgz

cd sqlsrv-5.10.0/
../phpize ; ./configure --with-php-config=/opt/lampp/bin/php-config ; make ; make test ; make install
cd ..

cd pdo_sqlsrv-5.10.0/
../phpize ; ./configure --with-php-config=/opt/lampp/bin/php-config ; make ; make test ; make install
cd ..

echo "extension=pdo_sqlsrv.so" >> `/opt/lampp/bin/php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
echo "extension=sqlsrv.so" >> `/opt/lampp/bin/php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

/opt/lampp/lampp restart
=============================

Someone know what library is creating a conclict or wich one I need to change?

Thank you for any help.
heberv
 
Posts: 12
Joined: 09. October 2012 16:18
Operating System: Linux Centos 6

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 38 guests