Upgrade Issue (1.1.9): Failure to open DB connection

Hi,

I have a problem with upgrading from 1.1.5 to 1.1.9.

After upgrade, my application fails to establish the DB connection (“CDbConnection failed to open the DB connection.”) When I revert to 1.1.5 everything works fine again. I did read the Upgrading Instructions, but couldn’t find anything obvious that I missed to do.

Config:

Apache 2.2.14

PHP 5.3.1 / extension=php_pdo_sqlsrv_53_ts_vc6.dll

SQLServer 2008 R2(?) Express (10.0.2531.0)

on an XP/SP3 system (my dev-box)

Your help is appreciated!

Florian

It’s a big skip from 1.1.5 to 1.1.9… maybe if you try to upgrade one version a time you will get which change is in question… so first upgrade to 1.1.6 and check if its working… .and so on…

when you find the version that breaks the connection, check the upgrade.txt if there is sonthing for that version, if not check the changelog.txt to see what has been fixed/changed in that version.

You are right, but I was tempted to skip intermediate upgrades by the cumulative upgrading instructions. :)

Anyway, I tracked it down. Issue is caused in 1.1.8 by change 2496 [not allowed to insert links] (Setting CDbConnection::$emulatePrepare to be false will now explicitly set PDO::ATTR_EMULATE_PREPARES to be false). Solution was to remove


'emulatePrepare' => false

from my DB configuration, as suggested in this: [http://www.yiiframework.com/forum/index.php?/topic/25101-yii-sql-server/] forum post.

Great framework, btw. Helps a lot, thank you!

Gread find.

Thank you for writing the result, this way someone with similar problem in the future will maybe read this post and have use from it.