Rajan
Rajan

Reputation: 2425

Session class not found when loading third party libararies

I am trying to use a third party library for openfire in my Codeigniter Application.

So I have put the libarary in third party folder, and have created an index.php file where I configure my Library.

Then I created a class file in library folder called index.php and I call the third party library like this:

<?php defined('BASEPATH') OR exit('No direct script access allowed');


class Open extends MY_Controller
{


public function __construct()
{
    parent::__construct();
}



public function index()
{
    require_once APPPATH.'third_party/openfire/index.php';
}

}

Finally created a controller called user.php and tried to load this libaray using :

$this->load->library('Open');

But on screen this shows me error:

Unable to locate the specified class: Session.php

Its an unexpected error! what can be the possible reasons for this ? If i stop load this library everything works fine.

And I have already loaded Session in autload.php

Upvotes: 0

Views: 162

Answers (1)

Abhineet Kashyap
Abhineet Kashyap

Reputation: 180

class Open extends MY_Controller

Try not extending the MY_Controller

Upvotes: 1

Related Questions