如何将Cakephp 1.3与MS SQLServer 2008连接? [英] How to connect Cakephp 1.3 with MS SQLServer 2008?

查看:109
本文介绍了如何将Cakephp 1.3与MS SQLServer 2008连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法连接到MSSQL Server。我已经研究了2天,但找不到任何有用的资源。这是我得到的错误:

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重写未正确配置。

URL rewriting is not properly configured on your server.

帮我配置数据库。我不/不能使用URL重写:

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


您的tmp目录是可写的。
FileEngine 用于缓存。要更改配置,请编辑 APP / config / core.php
您的数据库配置文件已存在。

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' => '',
    );
}

我该怎么办?

推荐答案

您需要使用cakephp [windows php driver]配置数据库。我不知道您使用的是哪个版本的cakephp。但是对于cakecake和wampserver的任何版本,Windows php驱动程序都不同。
详细信息
从此处下载sqlsrv驱动程序

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

,然后进行其余配置。


顺便说一下,您必须将sqlsrv驱动程序用于config / database.php

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

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

这篇关于如何将Cakephp 1.3与MS SQLServer 2008连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆