[eluser]minttux[/eluser]
hi bodies
i need somewhere in my website to call a library (that it called on header of each page)
that in that library inside the __construct() function i load encrypt class and also i need to call set_cipher(MCRYPT_BLOWFISH); to get short part of encoding so total lines in __construct() are:
Code:
public function __construct()
{
$this->CI =& get_instance();
$this->CI->load->library('encrypt');
$this->CI->encrypt->set_cipher(MCRYPT_BLOWFISH);
$this->_get_list_excited_libs();
}
then on other functions in bottom of layers inside that library i call encrypt class like this:
Code:
private function _get_list_excited_libs(){
...
$libs[]=$this->CI->encrypt->decode(base64_decode($value));
...
}
also another where i have:
Code:
private function _generate_encrypt_name($name){
return base64_encode($this->CI->encrypt->encode($name));
}
and all of this is for using in naming some files
if i don't use base64_encode it has forbidden characters and os prevent to create files with that names
and if i don't use set_cipher(MCRYPT_BLOWFISH); my names are very long
so both of these codes works correctly
but problem is when i use session on login page and everywhere i work with session i got this error:
Message: unserialize(): Error at offset 0 of 602 bytes
but when i comment this line on above code:
Code:
public function __construct()
{
$this->CI =& get_instance();
$this->CI->load->library('encrypt');
#$this->CI->encrypt->set_cipher(MCRYPT_BLOWFISH);
$this->_get_list_excited_libs();
}
the problem solved that i think there is conflict between this function and maybe same function inside session.php
so how can i fix this conflict ?