douyu0845 2016-08-16 17:23
浏览 37

CodeIgniter 3 + SQL Server + Windows 10

I have a project working with CodeIgniter and sqlserver 2008 I updated my pc to windows 10 then stopped working, the sqlserver driver for php is configured and my php ini shows it, also the code connects to sql server but now when im triying to do a query it givme false so this code:

 $this->db->select('*')->from('distritos')->get()->result();
Fatal error: Call to a member function result() on a non-object in C:\

Always its like sqlserver not working anymore but cannot fix it.

Php info shows

PDO

PDO support enabled
PDO drivers mysql, pgsql, sqlite, sqlsrv

pdo_sqlsrv

pdo_sqlsrv support  enabled
Version 3.0.2.2R (Unofficial)
Unofficial Changes  Works with Native Clients 11/10/9

sqlsrv

sqlsrv support  enabled
Version 3.0.2.2R (Unofficial)
Unofficial Changes  Works with Native Clients 11/10/9

EDIT: its my mistake cannot conect

Unable to connect to your database server using the provided settings.

Filename: C:/www/***/system/database/DB_driver.php

Line Number: 436

the database config its okay :S

  • 写回答

1条回答 默认 最新

  • douzhi7082 2016-08-16 18:05
    关注

    The error wasnt on the config, was on the password that was expired but the code igniter wasn't showing the error becouse i have to active this config :

    database.php

    'db_debug' => TRUE,
    

    Solved ;)

    评论

报告相同问题?