0

I'm trying to connect Code Igniter 3.1.8 with sql server 2000 but was not possible, i'm use php 5.6, Does someone know to make it works? this is my config database

$db['default'] = array(
'dsn'   => '',
'hostname' => '200.200.200.242\SERVERBARU',
'port' => '1433',
'username' => 'sa',
'password' => 'm45t3r',
'database' => 'DEPO2017',
'dbdriver' => 'sqlsrv',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE);

and this is my controller for call dummy data from table

public function index()
{
     $this->db = $this->load->database('default', TRUE);
    $this->load->view('welcome_message');
    echo "string";

    $query = $this->db->query("select TOP 10 * from dbo.Dokter");
    echo $query;

}

and i was enabling in php.ini

extension=php_sqlsrv_56_ts.dll

thanks for help me,

BARI ANTO
  • 15
  • 2
  • have you restarted the server after changed the php.ini ? otherwise it wont apply. – Anfath Hifans Apr 28 '18 at 05:15
  • refer here :https://stackoverflow.com/questions/8669337/codeigniter-mssql-connection/13433923 – Anfath Hifans Apr 28 '18 at 05:17
  • yes i have restart the server, but it doesn't work, – BARI ANTO Apr 28 '18 at 06:26
  • I think sql server 2000 not compatible with codeignteir 3.1.8, check the requirement of codeigniter 3.1.8 : https://www.codeigniter.com/user_guide/general/requirements.html clearly mentioned it will work only : MS SQL via the mssql, sqlsrv (version 2005 and above only) and pdo drivers – Anfath Hifans Apr 28 '18 at 06:30
  • maybe this helps https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9696a494-a496-4ac8-8389-d66ce8b3535c/cannot-integrate-php-ms-sql-server-2000-and-iis-60?forum=sqldriverforphp – Atural Apr 28 '18 at 09:40

0 Answers0