Connect CodeIgniter 3 with SQL server
We've a project with MSSQL Server (Navision as an ERP behind of that) and CI.
We had huge troubles with the official (sick!) driver from Microsoft and had problems with the 64 bit environment too;
After long research we found an unofficial release - read the posts of the following links. It worked like a charm for us:
How to install Microsoft's SQL Server Driver for PHP
Unofficial Microsoft SQL Server Driver for PHP (sqlsrv)
How to connect mssql in Codeigniter?
You are running an unsupported version of PHP. You need to upgrade your PHP version to continue to receive security updates. See https://php.net/supported-versions.php.
Doing this would also give you access to newer versions of the sqlsrv drivers. This is important because your current driver cannot connect to newer versions of SQL Server.
You've stated you're using SQL 2017. However as per the Microsoft PHP Drivers for SQL Server Support Matrix, with PHP version 5.6 you can only run version 3.2 of the sqlsrv drivers, and version 3.2 of the drivers only supports SQL 2014 and below.
Connect codeigniter database with SQL server on different server?
Make sure your server which has the database should support remote DB connection. You've to configure the remote db connection to use your db outside your server.
Say, if you are using linux based server and mysql as db, you can follow this doc:
https://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
Codeigniter: How to setup connection to a SQL server (2008)
I've had the same trouble you've had about a year ago. Have a look at the replies here, there are some great suggestions from people in there: CodeIgniter MSSQL connection
Also, a thread was posted a few days ago here: CI connect to SQL SERVER - check out my answer over there as well, since it's solved the problem for that particular developer.
Related Topics
PHP Check Value Against Multiple Values with Or-Operator
How to Check the Performance of MySQL Indexing
Onbeforeprint() and Onafterprint() Equivalent for Non Ie Browsers
Ajax Call with Contenttype: 'Application/JSON' Not Working
Get Size of Post-Request in PHP
Understanding Pdo MySQL Transactions
Get Value from JSON Array in PHP
Paypal Smart Subscribe Server Side
Parse Error: Invalid Numeric Literal
How to Can Post a Multiple Photos via Facebook API
Is PHP Str_Word_Count() Multibyte Safe
Authentication on Google: Oauth2 Keeps Returning 'Invalid_Grant'
Scroll Bar for Datalist in HTML5
How to Open a Link in Private Browsing Mode
How to Pass an Array in Get in PHP
How to "Validate" Human Names in Cakephp
Php: Using Domdocument Whenever I Try to Write Utf-8 It Writes the Hexadecimal Notation of It