![]() |
Connecting to MsSQL database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Connecting to MsSQL database (/showthread.php?tid=69740) |
Connecting to MsSQL database - Juicepig - 01-11-2018 Ubuntu: 16.04 Apache: Apache/2.4.18 (Ubuntu) CI: 3.1.6 I've been spinning my wheels on this for a day or two, think i need some help! I am making a clean build, for a very old CI based application with all the new bells and whistles - But i cannot get a basic database connection to work on the new box. application\models\User_model.php:: Code: class User_Model extends CI_Model application\config\database.php:: Code: $db[$active_group] = array( And when it is run: Quote:An uncaught Exception was encountered Line 112 is as follows (Unmodified from the downloaded version of CI) :: PHP Code: $this->conn_id = ($persistent) Obviously there may be a package or two missing, from ubuntu, or apache, but I can not figure out which. Help would be very much appreciated!! Attached is output from phpinfo RE: Connecting to MsSQL database - jreklund - 01-11-2018 1. Install sqlsrv driver: https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac#installing-the-drivers-on-ubuntu-1604-for-php-70 2. Change your dbdriver into 'sqlsrv' (application\config\database.php) RE: Connecting to MsSQL database - InsiteFX - 01-12-2018 Driver should also be MySQLi not MySQL RE: Connecting to MsSQL database - Juicepig - 01-15-2018 (01-11-2018, 02:15 PM)jreklund Wrote: 1. Install sqlsrv driver: Excellent - That was the push in the right direction i needed. Thank you! |