I am building a laravel application that requires to connect to sql server and fetch some data . i have already put my credentials in database config file as follows
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('SQL_HOST'),
// 'port' => env('SQL_PORT'),
'database' => env('SQL_DATABASE'),
'username' => env('SQL_USERNAME'),
'password' => env('SQL_PASSWORD'),
'charset' => 'utf8',
'prefix' => '',
],
Unfortunately when a run my queries i get this error
PDOException in Connector.php line 55:
SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)
Can anyone please suggest on the workaround to solve this problem . i am suing Godaddy shared hosting . when i read other posts , they say that the solution is to use freetds as shown here . If this is so , how i am suppose to implement that ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire