I am getting this error once i auto -load session. i installed apache and dropped codeigniter into htdocs folder ... when i auto load the session library i an getting that error
Capture.PNG (Size: 51.05 KB / Downloads: 7)

$this->db->like('title', 'match'); //produces WHERE `title`LIKE '%match%'
WHERE `title` LIKE 'ma_ch'
WHERE `title` LIKE 'ma%h%'
require_once(BASEPATH .'core/URI.php');
$URI = new CI_URI();
$config['sess_driver'] = 'files';
if ($URI->segment(1) == 'admin') {
$config['sess_cookie_name'] = 'admin_sessions';
$config['sess_expiration'] = 1440;
$config['sess_save_path'] = FCPATH . 'application/cache/session/admin/';
} else {
$config['sess_cookie_name'] = 'catalog_sessions';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = FCPATH . 'application/cache/session/catalog/';
}
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant UTF8_ENABLED - assumed 'UTF8_ENABLED'
Filename: core/URI.php
Line Number: 328
Backtrace:
File: C:\xampp\htdocs\project-1\application\config\config.php
Line: 371
Function: __construct
File: C:\xampp\htdocs\project-1\index.php
Line: 315
Function: require_once
<select name="mechanic_134" id="mechanic-134" class="form-control selectpicker">
<?php foreach ($pages as $pages_item): ?>
<?php //$pages=array(); ?>
<?php foreach ($pages as $pages_item): ?>
<div class="widget-box">
<div class="widget-title"><h5>Pages</h5></div>
<div class="widget-content">
<?php echo form_open('cpages/editpagesupdate'); ?>
<table border="0" style="width: 100%; height: 90px;">
<tr>
<td>Pages Name</td>
<td><input type="text" name="pages_name" value="<?php echo $pages_item['pages_name']; ?>"></td>
</td>
<tr>
<td>Create Date</td>
<td><input type="text" name="create_date" value="<?php echo $pages_item['create_date']; ?>"></td>
</td>
<tr>
<td>Order</td>
<td><input type="text" name="pages_order" value="<?php echo $pages_item['pages_order']; ?>"></td>
</td>
<tr>
<td>View Content</td>
<td><textarea rows="3" cols="20" name="pages_content"><?php echo $pages_item['pages_content']; ?></textarea></td>
</td>
<tr>
<td></td>
<td><input type="submit" class="edit" name="submit" value="SUBMIT"></td>
</tr>
</table>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<table border="0" style="width: 100%; height: 90px;">
<tr>
<td><?php echo anchor('', 'ID'); ?></td>
<td><?php echo anchor('', 'CONTENT NAME'); ?></td>
<td><?php echo anchor('', 'CREATE DATE'); ?></td>
<td><?php echo anchor('', 'EDIT'); ?></td>
<td><?php echo anchor('', 'DELETE'); ?></td>
</tr>
$db['default'] = array(
'dsn' => 'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=C:\Users\Dinu\Desktop\TestDB.accdb',
'hostname' => 'localhost',
'username' => 'Dinu',
'password' => '',
'database' => '',
'dbdriver' => 'odbc',
...
);
<?php
class News_model extends CI_Model {
public function __construct()
{
$this->load->database();
}
public function get_news($slug = FALSE)
{
if ($slug === FALSE)
{
// $query = $this->db->get('news');
// Err: Call to undefined method CI_DB_odbc_driver::get()
$query = $this->db->query('SELECT * FROM news');
// This is good
return $query->result_array();
}
// $query = $this->db->get_where('news', array('slug' => $slug));
// Err: Call to undefined method CI_DB_odbc_driver::get_where()
// $query = $this->db->query('SELECT * FROM news WHERE slug = "' . $slug . '"');
// Err: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1
$query = $this->db->query('SELECT * FROM news', array('slug' => $slug));
// This allways gets only the first news, regardless of what the slug is.
return $query->row_array();
}
public function set_news()
{
$this->load->helper('url');
$slug = url_title($this->input->post('title'), 'dash', TRUE);
$data = array(
'title' => $this->input->post('title'),
'slug' => $slug,
'tecst' => $this->input->post('tecst')
);
// return $this->db->insert('news', $data);
// Err: Call to undefined method CI_DB_odbc_driver::insert()
// return $this->db->query('INSERT INTO news (title, slug, tecst) VALUES ("' .
// $this->input->post('title') . '", "' .
// $slug . '", "' .
// $this->input->post('tecst') . '")');
// Err: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 3
return $this->db->query('INSERT INTO news (title, slug, tecst) VALUES (s, s, s);', $data);
// Err: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1
}
}
A PHP Error was encountered
Severity: Warning
Message: sqlsrv_query() expects parameter 1 to be resource, boolean given
Filename: sqlsrv/sqlsrv_driver.php
Line Number: 152
A PHP Error was encountered
Severity: Warning
Message: sqlsrv_query() expects parameter 1 to be resource, boolean given
Filename: sqlsrv/sqlsrv_driver.php
Line Number: 152
Fatal error: Call to a member function num_rows() on boolean in C:\xampp\htdocs\project-web\src\resources\system\libraries\Session.php on line 216
ERROR - 2016-08-28 15:40:39 --> Unable to connect to the database
ERROR - 2016-08-28 15:40:39 --> Unable to connect to the database
ERROR - 2016-08-28 15:40:39 --> Severity: Warning --> sqlsrv_query() expects parameter 1 to be resource, boolean given C:\xampp\htdocs\prompt-web\src\resources\system\database\drivers\sqlsrv\sqlsrv_driver.php 152
ERROR - 2016-08-28 15:40:39 --> Severity: Warning --> sqlsrv_query() expects parameter 1 to be resource, boolean given C:\xampp\htdocs\prompt-web\src\resources\system\database\drivers\sqlsrv\sqlsrv_driver.php 152
ERROR - 2016-08-28 15:40:39 --> Unable to connect to the database
ERROR - 2016-08-28 15:40:39 --> Severity: Warning --> sqlsrv_query() expects parameter 1 to be resource, boolean given C:\xampp\htdocs\prompt-web\src\resources\system\database\drivers\sqlsrv\sqlsrv_driver.php 152
ERROR - 2016-08-28 15:40:39 --> Severity: Warning --> sqlsrv_query() expects parameter 1 to be resource, boolean given C:\xampp\htdocs\prompt-web\src\resources\system\database\drivers\sqlsrv\sqlsrv_driver.php 152
class Page extends \CodeIgniter\Controller
{
public function index()
{
$data = [
'page_title' => 'Your title'
];
echo view('header');
echo view('menu');
echo view('content', $data);
echo view('footer');
}
}
...
$data = array('page_title' => 'Your title');
...
class Host extends CI_Controller {
public function ?()
{
}
}
<?php foreach ($posts as $post): ?>
<tr>
<td><?php echo $post['ctgparent_name']; ?></td>
<td><?php echo $post['ctgparent_description']; ?></td>
<td><button type="button" class="edit" onclick="location.href='<?php echo site_url('cpages/editparentctg/'.$post->ctgp_no); ?>';">EDIT</button></td>
<td><button type="button" class="delete" onclick="location.href='<?php echo site_url('cpages/editparentctg/'.$post->ctgp_no); ?>';">DELETE</button></td>
</td>
<?php endforeach; ?>
public function pcategories() {
$data['posts'] = $this->Mpages->call_parentctg();
//$data['ctgparent_name'] = $this->Mpages->call_parentctg();
//$data['ctgparent_description'] = "Second";//$this->Mpages->retrieve_parentctg();
$this->load->view('pcategories', $data);
public function call_parentctg()
{
$query = $this->db->get('menu_parent');
return $query->result_array();
}
public function getListProds($listID){
$superID = 0;
$query = $this->db->query("CALL getList('".$listID."',".$superID.")");
mysqli_next_result( $this->db->conn_id );
$num_rows = $query->num_rows();
$datas = $query->result_array();
if($num_rows == 0){
return null;
}else{
return $datas;
}
}