I have a problem connecting to a db with zend framework 1.12 and zend studio. The code in the application.ini to connect to the db is the following:
resources.db.adapter = pdo_mssql
resources.db.params.host = "IPADDRESS\SQLEXPRESS"
resources.db.params.username = sa
resources.db.params.password = XXXXXXXX
resources.db.params.dbname = namedb
resources.db.isDefaultTableAdapter = true
resources.db.params.pdoType = dblib
resources.db.params.charset= "utf-8"
The db is available online (I checked) but i get the following error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[01002] Adaptive Server connection failed (severity 9)
I know this error is a connection error (the pdo doesn't find the db) and i've found a tutorial in a forum which should help (it uses zend framework with the same libraries and type of db i use, on a mac). But i think the pdo type is configured somewhere elsein my machine as i don't find in my Abstract.php:
protected $_pdoType = 'dblib';
The pdo type is set in the application.ini, the code i pasted before. The log says the error is in those lines:
in /usr/local/zend/var/libraries/Zend_Framework_1/1.12.3/library/Zend/Db/Adapter/Pdo/Abstract.php:129
$this->_connection = new PDO(
$dsn,
$this->_config['username'],
$this->_config['password'],
$this->_config['driver_options']
);
But i cannot understand what I'm missing.. Any hint?