Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In all likelihood, I have overlooked a fine print somewhere, so this question may sound stupid, but will clear my doubts.

I spent hours trying to install pdo_sqlsrv PDO driver on Ubuntu 13.04 PHP 5.5.3 server. The attempt was based upon a phpinfo() screen-shot sent to me showing such a driver available and enabled. So, I tried to get it working on a Ubuntu-PHP machine.

I saw pdo_sqlsrv and sqlsrv available when I check with

pecl search sqlsrv

Upon trying to install it (pecl install pdo_sqlsrv), I encountered phpize issue : "cannot find config.m4" (-this issue has a lot of coverage on web, but no clear solution).

However, it later dawned upon me what-if this module is for a Windows based setup and not for a Linux based PHP. Can somebody confirm that and point me to ideal setup for PHP with MSSQL driver enabled.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

From the documentation for the sqlsrv extension at http://www.php.net/manual/en/sqlsrv.installation.php

The SQLSRV extension is only compatible with PHP running on Windows.

There is the experimental dblib https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCwQFjAA&url=http%3A%2F%2Fwww.php.net%2Fmanual%2Fen%2Fref.pdo-dblib.php&ei=dMkpU-qfEM3MqQG3voGIBw&usg=AFQjCNEDWwq6z9FlZUD4PqKRUXiOGQT6Pw&sig2=LsucfGyAAzq5uO6doPPXNw&bvm=bv.62922401,d.aWM

share|improve this answer
    
Thanks. Later that day I contacted the engineer who sent me a part of phpinfo() about his set that include the said extension (pd0_sqlsrv). He confessed that it is from a windows-apache-php server. I was ripping my hair apart! I managed to get it working with freetds –  anup Mar 21 at 11:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.