I Am using Yii 1.1.4 and trying to connect to a MS SQL 2000 server. This is supposedly a supported DB server which is what first brought me to try yii. Most frameworks don’t support SQL Server 2000 because it is so old, but it is nevertheless what I am stuck working with for the time being.
I am using yii on Gentoo linux and working through the Agile Development with Yii book. It connects to the local MySQL server just fine and I can connect to the MS-SQL with a regular PHP script using mssql_connect(). I have searched these forums and not found anything that solves my issue.
My db array from protected/config/main.php looks like:
'db'=>array( #'connectionString' => 'mysql:host=localhost;dbname=trackstar_dev', 'connectionString' => 'mssql:host=10.166.250.3;port=1433;dbname=RMA', 'emulatePrepare' => true, 'username' => 'MyLogin', 'password' => 'MyPassword', 'charset' => 'utf8', ),
Including the commented out MySQL connection string which works. I have tried using both the IP and the hostname of the server, either work with mssql_connect(), but no luck so far. When I try to run the unit test I get:
[glen@alhazred tests]$ phpunit unit/DbTest.php
PHPUnit 3.4.15 by Sebastian Bergmann.
Time: 1 second, Memory: 5.25Mb
There was 1 error:
CDbException: CDbConnection failed to open the DB connection.
Tests: 1, Assertions: 0, Errors: 1.
Anyone have any ideas?
Thanks in advance. I apologize if this was covered elsewhere.