Cake2 uses the new sqlsrv extension for php.  This php extension is
available only from Microsoft.  It is different than the old php-mssql
extension, and much better from what I hear.  Fortunately Microsoft
recently made a linux 64bit version available:

http://www.microsoft.com/download/en/details.aspx?id=28160

However if you cannot install that on your system you will need to use
freetds to get the dblib extension in pdo.  Check your linux package
manager for freetds.  (On ubuntu you simply install the php-sybase
package).

Once installed I would recommend copying the old sqlsrv datasource,
renaming it to something else.  Since it uses PDO the connection
string should be the biggest change:

https://github.com/cakephp/cakephp/blob/master/lib/Cake/Model/Datasource/Database/Sqlserver.php#L131

reference here for the correct reference string:

http://php.net/manual/en/ref.pdo-dblib.php

I have used dblib before with PDO, but not with cake, but this should
work.  It would be nice to have an alternative connection though.

Trent



On Feb 7, 10:12 am, Justin Edwards <justinledwa...@gmail.com> wrote:
> I've spent a whole day trying to make this work with 2.x,  no luck from
> linux.
>
> On Tue, Feb 7, 2012 at 8:51 AM, Gianluca Gentile <gianluca.gent...@gmail.com
>
>
>
>
>
>
>
> > wrote:
> > Hi all,
> >  I need to connect my linux server (Debian 6) to Microsoft SQL Server
> > 2005 with CakePHP 2.0.6 but the PDO driver "Sqlserver" not exist for
> > Linux...How it's possible!?
>
> > Sorry for my english... :)
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to