Changed base_url - now sessions dont work |
[eluser]Stuart Marsh[/eluser]
Hi all, I have been developing a site using an internal web server (192.168.1.4) and I am now testing it on a real IP. I have changed the $config['] in config and my logon page loads fine. But when I submit my logon details the session is not populating with my data (username/password/etc). I know the username/password are correct and everything works if I change base_url back to 192.168.1.4. I have also tried setting cookie_domain to the real IP (it was blank before) but this didn't resolve the problem. Can anybody shed any light on this?
[eluser]pvijayanands[/eluser]
I think PHP Session is working fine in CI.. Before that i have used the CI session... its not working.. When i used the PHP session, it will be working fine.. can u plz try the PHP Session....
[eluser]pvijayanands[/eluser]
Yes.... like.. Code: $config['cookie_path'] = "/home/index.php";
[eluser]hostingx[/eluser]
huh? so this is the path to you webapplication: http://yourdomain.ext/home/index.php ?
[eluser]Stuart Marsh[/eluser]
I haven't touched $config['cookie_path']. Could you give me an example of how it should look (please note I am using Windows specifically Uniform Server)?
[eluser]Stuart Marsh[/eluser]
More info. My setup revolves around my firewall forwarding http traffic to my web server. Original I was accessing the webserver through the LAN so no problems. Now I am trying to access the webserver with a real-world IP and PHP cookies seem to have a problem with this. I created a page to set and retrieve a cookie. If I access it using localhost it is fine and data is returned. If I try it through the external IP, nothing is returned. Is this because the server does not know which cookie to retrieve? |
Welcome Guest, Not a member yet? Register Sign In |