Welcome Guest, Not a member yet? Register   Sign In
Strange db_session problem
#1

[eluser]Référencement Google[/eluser]
Hi,

I've got a strange db_session library problem (library taken in FreakAuth, but probably doesn't matter)

I try to store in a session the actual uri, so I made like that:

Code:
$this->db_session->set_flashdata('redirect_uri', $this->uri->uri_string());

In the DB table ci_sessions, field session_data, I get this result:

Code:
a:10:{s:2:"id";s:1:"7";s:9:"user_name";s:10:"elitemedia";s:10:"country_id";N;s:5:"email";s:24:"[email protected]";s:4:"role";s:4:"user";s:10:"last_visit";s:19:"2007-08-17 23:16:17";s:7:"created";s:19:"2007-08-17 23:16:17";s:8:"modified";s:19:"0000-00-00 00:00:00";s:22:"flash:old:redirect_uri";s:39:"/espace_vipx/view_profile/favicon.ico";s:22:"flash:new:redirect_uri";s:39:"/espace_vipx/view_profile/favicon.ico";}

What is very strange, is why he put at the end of my uri "favicon.ico", this is not in the uri wich originally look like that:

Code:
http://localhost/dev/espace_vipx/view_profile/1

If I try to echo $this->uri->uri_string(), I get the right uri string, this problem comes only when i include the uri in the DB. Maybe this is the numeric number ID at the end ?

I turned crazy with this, can somebody help ?
#2

[eluser]Référencement Google[/eluser]
I answer to myself, just found the problem.
That is a little bit crazy and I was far away from thinking it can come from that, but hope this will help somebody here one day since I loosed 4 hours to find it !

In my HTML <head></head> I had this:
Code:
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

So, I put that:
Code:
<link rel="shortcut icon" href="<?=base_url()?>favicon.ico" type="image/x-icon" />

And it's working... really strange and still do not understand why this happend !
#3

[eluser]esra[/eluser]
[quote author="elitemedia" date="1187410263"]And it's working... really strange and still do not understand why this happend ![/quote]

It's best to use absolute paths whenever possible, especially in views and templates.




Theme © iAndrew 2016 - Forum software by © MyBB