Can you please check the below mention parameters in phpinfo(), if following parameters are set then your connection should work
Php Registered Stream should have sqlsrv
Under Apache Environment-> PATH -> its should have the environment variable or path of SQL Server 2005 installation
Under PDO Section -> POD driver should contain sqlsrv
pdo_sqlsrv should be enabled
sqlsrv support should be enabled
Also check if you have installed Sql Server 2005 Native Client, If not then you can download it from Microsoft website
Also Please find below the procedure to check whether SQLSRV is working fine or you have complete installation of sqlsrv DLL files or not
Check if the extension for MsSql exist in your "ext" folder of php installation, if not then kindly search for "Microsoft Drivers 3.0 for PHP for SQL Server" and download it from Microsoft website
Download SQLSRV30.EXE for PHP 5.3.6 or PHP 5.4.
OR
Download SQLSRV20.EXE for PHP < PHP 5.3.6.
and then load the DLL files after running this exe file into the "ext" folder of php installation by setting installing path popped up during installation.
After this, install Microsoft SQL Server 2005 Native Client available in the available on microsoft website after searching "SQL Server 2005 Feature Pack"
Restart the Microsoft SQL Server 2005
As this is my first post on YII, I am not able to share direct links so I’m sharing the keywords to search on google for Drivers and Native Clients of SQL Server
[size=2]Thank you for your advise Ravi Madan,. [/size]
Now i can connect my yii with sql server 2005, also can create model generator without error,.but i changed the location of db server,. from ip xxx.xx.x.xxx(different PC that is install windows server) into PC1111\SQLEXPRESS(localhost).
this is my step
copy file php_sqlsrv_52_ts_vc6.dll & php_pdo_sqlsrv_52_ts_vc6.dll into xampp\php\ext
add this script under file php.ini -> xampp\apache\php.ini