Welcome Guest, Not a member yet? Register   Sign In
Security library Loading Error
#1

[eluser]Eng.Faruk[/eluser]
When using the security helper in a controller ,i got error like this
$this->load->library('security');
$this->load->helper('security');


Error:

PHP Error was encountered
Severity: Notice

Message: Undefined property: Careers::$security

So can anyone suggest me to figureout the problem?
#2

[eluser]InsiteFX[/eluser]
The Error is telling you that $security is not defined!

Try adding this at the top of your class.
Code:
public $security = '';
#3

[eluser]Eng.Faruk[/eluser]
Dear,
Thanx for your reply.
Now i getting this error.


Quote:An Error Was Encountered
Unable to load the requested class: security


Awaiting for your feedback.
#4

[eluser]InsiteFX[/eluser]
Where are you loading this?
Controller, Library or Model

You need to show your code for us to be able to help you.
#5

[eluser]Eng.Faruk[/eluser]
Code:
class NewPassport extends Controller {

public $security = '';
function NewPass()
{
  parent::Controller();
    

  $this->load->library('security');
  $this->load->helper('security');
  
  $this->load->helper('url');
  $this->load->helper('form');
        $this->load->library('session');    
        $this->load->model('cms_model','cms', TRUE);
  $this->load->library('form_validation');
  

}
#6

[eluser]pickupman[/eluser]
Using CI 2.0 or higher, the Security class is autoloaded by default because it is a core class. You do not need to load it. If you comment that line out, are you still getting an error?
#7

[eluser]Eng.Faruk[/eluser]
I am using CI_VERSION 1.7.1
and if comment the line like below
//public $security = '';
Then Error comes like this
Quote:An Error Was Encountered
Unable to load the requested class: security
#8

[eluser]pickupman[/eluser]
[quote author="Eng.Faruk" date="1330285732"]I am using CI_VERSION 1.7.1[/quote]

I would strongly recommend upgrading your version of CI as there are have been several updates since. The upgrade usually takes about 10-15 to rename a few constructors.
#9

[eluser]Eng.Faruk[/eluser]
without updating the version is it possible to fix the error?
#10

[eluser]Noobigniter[/eluser]
Why do not update ? it's free ^^




Theme © iAndrew 2016 - Forum software by © MyBB