I need to connect to a remote MSSQL server using PHP. I've successfully connected using the dblib, but it has some pretty "nasty" limitations.

I discovered it is unable to fetch column rows that are in the ntext format, there is a simple workaround for this, but it limits the output (converting the ntext to nvarchar via the query), I then noticed it also has problems fetching the rows in decimal format (or so it seems, unfortunately the General error 4004 thrown for everything isn't very helpful).

There is just too much hacking required for my liking, is there a better way to approach this, maybe a different db library I should look into for my connection?

It's worth noting that I've used mssql\_\* with great success, but it is obviously not an ideal approach and I wish to keep using PDO.

---

Things worth noting;

I'm running on Debian, and I know Microsoft has released drivers for ODBC, but their driver downloads are bugged and thus don't work (at least not on non-RHEL systems it seems)