Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3283

CakePHP MSSQL connection issue (1 reply)

$
0
0
Hello! This is basically my first time i'm trying to connect to a MSSQL, so i'm a little confused if i did everything correctly, because i'm getting this error:

Error: A Database connection using "Sqlserver" was missing or unable to connect.

The database server returned this error: SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53].

I have:

Wampserver 3 (32 bit)
OS: Windows 10 (64 bit)
PHP Version: 5.6.15
Apache Version: 2.4.17


I downloaded and added to "C:/wamp/bin/php/php5.6.15/ext" the files:

php_mssql.dll
php_pdo_sqlsrv_56_ts.dll
php_sqlsrv_56_ts.dll


I modified the file "php.ini" adding the lines:

extension=php_mssql.dll
extension=php_pdo_sqlsrv_56_ts.dll
extension=php_sqlsrv_56_ts.dll

And then i verified that the extensions were added correctly and they are.


In my database.php file i have the following lines:

class DATABASE_CONFIG {

public $default = array(
'datasource' => 'Database/Sqlserver',
'persistent' => false,
'host' => '.\SQLEXPRESS',
'login' => 'sa',
'password' => 'thePassword',
'database' => 'theDatabase',
'prefix' => ''
);
}

The database is a local database on SQL Server 2014 Manager Studio, i created the database recently but i still cant figure out why im still getting that error.

I have also tried to change the host to 'LOCALHOST\SQLEXPRESS' but its still the same.

I would really appreciate if someone could help me with this. :)

Viewing all articles
Browse latest Browse all 3283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>