title: Error connecting to db mssql php zend 1.12
body: <p>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:</p>
  
  <pre><code> 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"
  </code></pre>
  
  <p>The db is available online (I checked) but i get the following error:</p>
  
  <pre><code> Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[01002] Adaptive Server connection failed (severity 9)
  </code></pre>
  
  <p>I know this error is a connection error (the pdo doesn't find the db) and i've found a <a href="http://zend-framework-community.634137.n4.nabble.com/Connecting-to-MS-SQL-Server-td671976.html" rel="nofollow">tutorial</a> 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:</p>
  
  <pre><code> protected $_pdoType = 'dblib';
  </code></pre>
  
  <p>The pdo type is set in the application.ini, the code i pasted before. The log says the error is in those lines:</p>
  
  <pre><code> in /usr/local/zend/var/libraries/Zend_Framework_1/1.12.3/library/Zend/Db/Adapter/Pdo/Abstract.php:129 
  
              $this-&gt;_connection = new PDO(
              $dsn,
              $this-&gt;_config['username'],
              $this-&gt;_config['password'],
              $this-&gt;_config['driver_options']
          );
  </code></pre>
  
  <p>But i cannot understand what I'm missing.. Any hint?</p>