Problem connecting PHP with SQL Server

I have downloaded the php-sqlsrv 5.10.0-1 package from AUR. Also i have added the line “extension=/usr/lib/php/modules/sqlsrv.so” in my php.ini on xampp(/opt/lampp/etc/php.ini). But still i get the error( Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in /opt/lampp/htdocs/portal/auth.php:41 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/portal/auth.php on line 41 )

You are trying to connect to a Microsoft SQL Server on LAMP? Is that correct? Does a “Microsoft SQL Server” even run on Linux?

I have downloaded the XAMPP from AUR, but the folder is named LAMP( I don’t quite know the differences). Microsoft SQL Server is not running in my Linux System. I am in university and they provide us with a database in school equipment. I am new to Manjaro as I downloaded it yesterday. The project was working fine in my XAMPP on Windows.

Sure it does - incredibly well I might add - I use it to hold some huge development databases (+100G) where I extract information for a CRM system.

It is not straight forward but doable using the buildscripts from AUR and reading the instructions on

Azure Datastudio is also running on Linux - again from AUR build scripts.

3 Likes

oh ok… thanks.

@larkoss

Maybe I am wrong, but shouldn’t it be 2 libs?

extension=/usr/lib/php/modules/sqlsrv.so
extension=/usr/lib/php/modules/pdo_sqlsrv.so