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 求指导ADS低噪放设计
  • ¥15 CARSIM前车变道设置
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存