donglu6805 2014-09-19 01:15
浏览 48
已采纳

Cakephp无法连接到sqlserver

I got this error :

CakePHP is NOT able to connect to the database.

Database connection "Sqlserver" is missing, or could not be created.

Details :

  • CakePHP 2.5.4
  • Wamp server 32-bit
  • Dreamweaver CS6
  • SQL Server 2014

On my details.php

class DATABASE_CONFIG {

public $default = array(
    'datasource' => 'Database/Sqlserver',
    'persistent' => false,
    'host' => 'localhost\MSSQLSERVER',
    'database' => 'testing'
);

I have load both the extension on both ext folder (apache & php) and on php.ini

extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll

Searched everywhere but still cannot connect to sqlserver.

note : I can connect to MySQL but not SQLServer

  • 写回答

3条回答 默认 最新

  • doudengshen5591 2014-10-02 02:19
    关注

    In the end, i've found the solution. It's the problem of WAMPP server. Tho i have it installed on other machine and it works, it's not the same with the machine i'm currently using. So what i do is:

    1. Uninstall WAMPP
    2. Install XAMPP
    3. Configure php.ini on apache and php
    4. Load extensions in the ext folder of php

    Note : I did the same configuration with WAMPP earlier

    Then everything works like a charm.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog