Hello,

I'm trying to follow the Practical symfony 'jobeet' tutorial at
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/ except with MS
SQL Server 2008 R2 and IIS on Windows Server 2008 R2 instead of on
MySQL and Apache. I'm getting a problem with Doctrine connecting to my
MSSQL Server which is on the same machine as symfony, IIS and PHP.
When I attempt to run the doctrine command I get

c:\jobeet>php symfony doctrine:insert-sql
>> doctrine  creating tables


  Couldn't locate driver named mssql



My databases.yml contains the following:
all:
  doctrine:
    class: sfDoctrineDatabase
    param:
      dsn: 'mssql:host=localhost;dbname=jobeet'
      username: sa
      password: my_sa_password


I have been following the instructions at the More With Symfony book
at 
http://www.symfony-project.org/more-with-symfony/1_4/en/11-Windows-and-Symfony
in order to get symfony installed and running on Windows with IIS. To
that end, I installed PHP using the Web Platform Installer from
http://www.microsoft.com/web/downloads/platform.aspx as was detailed
in More with Symfony. I also installed the Microsoft SQL Driver 2.0
for PHP v5.3 in IIS, thinking that was needed.

So when I check my PHP installation at C:\Program Files (x86)\PHP\v5.3
that WPI installed, in the ext folder there's a php_sqlsrv.dll,
php_pdo_sqlsrv.dll, php_pdo_odbc.dll but no php_mssql.dll or
php_pdo_mssql.dll. Is there supposed to be a php_mssql.dll? What
package do I need to install to get that support? How do I install it?

I'm assuming php_sqlsrv.dll and php_pdo_sqlsrv.dll are the Microsoft
SQL Driver 2.0 for PHP v5.3 in IIS, but when I try to change the dsn
in databases.yml to either 'sqlsrv:host=localhost;dbname=jobeet' or
'pdo_sqlsrv:host=localhost;dbname=jobeet', I get the error 'Unknown
driver sqlsrv' and 'Unknown driver pdo_sqlsrv' I also tried adding an
odbc connection and using 'odbc:host=localhost;dbname=jobeet' and
still got a similar error. What is the correct syntax for the the dsn
for the different databases? Why doesn't Doctrine support the
Microsoft SQL Driver for PHP? Which package do I need to install to
get dll needed for the Doctrine support for MSSQL?

The only mention of the MSSQL drivers in the More with Symfony book is
the following. The tutorial doesn't actually use the drivers, it uses
the SQLite driver.

Planned Extension for this Tutorial
A supplemental section of this chapter is in the works and will be
released on the symfony
project web site shortly after the publication of this book. It covers
the connection to MS
SQL Server via PDO, something Microsoft is planning improvements for
soon.
[PHP_PDO_MSSQL]
extension=php_pdo_mssql.dll
Currently, the best performance in code execution is obtained by the
Microsoft native SQL
Server driver for PHP 5, an open-source driver available on Windows
and currently
available in version 1.1. This is implemented as a new PHP extension
DLL:
[PHP_SQLSRV]
extension=php_sqlsrv.dll
It is possible to use either Microsoft SQL Server 2005 or 2008 for the
database. The planned
tutorial extension will cover the usage of the edition that is
available for free: SQL Server
Express.

It doesn't look like that Planned Extension was ever updated to be
part of the tutorial.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to