How to connect Cakephp 1.3 with MS SQLServer 2008?

我们两清 提交于 2019-12-24 08:08:43

问题


I can't connect to MSSQL Server. I've been researching for 2 days, yet I can't find any useful resources. This is the error I'm getting:

URL rewriting is not properly configured on your server.

Help me configure my database. I don't / can't use URL rewriting:

Your tmp directory is writable. The FileEngine is being used for caching. To change the config edit APP/config/core.php Your database configuration file is present.

Here's my database config file:

class DATABASE_CONFIG { 
    var $default = array(
        'driver' => 'mssql',
        'persistent' => false, 
        'host' => 'Charmae-PC\Charmae', 
        'login' => 'sa', 
        'password' => 'pass',
        'database' => 'obbm',
        'prefix' => '',
        'port' => '',
    );
}

What should I do?


回答1:


You need to configure your database with cakephp[windows php driver]. I don't know which version cakephp are you using. But for any version of cakephp and wampserver windows php drivers are different.
for more information Download the sqlsrv driver from here

and then the rest of configuration.
By the way you have to use sqlsrv driver for config/database.php

var $default = array(
    'driver' => 'sqlsrv',
     ...


来源:https://stackoverflow.com/questions/7624436/how-to-connect-cakephp-1-3-with-ms-sqlserver-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!