Answer the question
In order to leave comments, you need to log in
How to fix error when connecting to MS SQL?
SW. community, please help. I'm trying to connect to MS SQL c under Linux on php, but it returns an error to me (could not find driver). Tell me what driver it can't find? Or is there a simpler connection without using PDO?
This is my first attempt at interacting php and ms sql, so if it doesn't make it more difficult, tell me in as much detail as possible.
try {
$DBH = new PDO("mssql:host=$server;dbname=$dbname", '$login', '$pass');
} catch (PDOException $e) {
echo $e->getMessage();
}
Answer the question
In order to leave comments, you need to log in
Thank you all for the answers, as it turned out there was no role / permission to the database.
it can't find pdo_mysql
phpfaq.ru/pdosudo apt-get install php5-mysql
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question