I am trying to connect to a Microsoft SQL Server database, with CakePHP 2.2.4. As my dev environment I have installed a fresh WAMP Server on my machine.
I have enabled the PHP extensions:
- php_mssql
- php_pdo_mssql
- php_sqlsrv_53_ts
- php_curl (this one might be irrelevant).
I also have enabled the module in Apache:
- rewrite_module.
I have have changed the salt entries in the core.php file. I have tried to connect to my database through database.php as so:
public $default = array(
'datasource' => 'Database/Sqlserver',
'persistent' => false,
'host' => 'Servername',
'login' => 'Username',
'password' => 'secretpassword',
'database' => 'TheDatabase',
'prefix' => '',
//'encoding' => 'utf8',
);
I go to the index.php to test the connection and i get in yellow:
Cake is NOT able to connect to the database. Database connection "Sqlserver" is missing, or could not be created.
I see that it is failing at the datasource so it must be some module or extension or dll or something missing ...
The server is located within our intranet, if that helps.