Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get PDO's to work with SQL Server and I'm completely lost. I found this :

and told to try this:

sudo apt-get install php5-mssql

I downloaded the pecl, but I have no idea what it is or where it goes. The manual didn't help and even if the sudo command did work, I have no clue where to type it...

I will fully admit, I am completely ignorant of all of this and don't even know where to start at this point.

My server is hosted by some hosting company, it's a LAMP, I can log into cPanel. That's all I know.

share|improve this question

closed as off-topic by kasperd, MadHatter, Ward, mdpc, yagmoth555 Mar 16 at 18:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Watch out, the mssql extension is not the same thing as the dblib extension. – Charles Jun 5 '12 at 17:59
up vote 1 down vote accepted

If all you have is cPanel access to your server, then you will have to contact your hosting company's technical support to help you set this up.
You can use the php5 mssql extension to talk to Sql Server via a linux machine, but you have to install on the server first. gives a good detailed overview of what is required with installing the mssql extension once freetds is installed. But this requires shell access to the server and typically either sudo or root access.

share|improve this answer

I have successfully installed the PDO_DBLIB on my local and hosted servers.

The local server was easy as I had complete root access. To install PDO_DBLIB, all I did was run this command on the Ubuntu LAMP server I set up.

sudo apt-get install php5-sybase

To install this on my hosted server was a slightly different matter. I had to call them and tell them what I wanted. After confusing a Level 1, I was escalated and they informed me that it would be a billable custom service. The server was running Cent OS (which I don't really know that well) so I'm not sure what exactly was done, but they were able to complete my request without any major issues. The host was HostGator and it cost me around $35.

Side note/warning, PDO_DBLIB has a relatively serious but simple issue as of 5.4.9 that hasn't been fixed quite yet, so I'd hold back to an older version for a little while.

share|improve this answer
Your adventures with your provider are not really relevant in this case. – Sven Jan 30 '13 at 15:20
They absolutely are. My question was regarding how to install the driver on a server. I answered how to do this technically and clarified what I, and most likely others, had to do to get it on a VPS that doesn't offer root access. The details might be slightly superfluous and not applicable to some, but I figured my experiences might help others. – Will Meldon Jan 30 '13 at 16:11

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