Welcome Guest, Not a member yet? Register   Sign In
Difference between localhost and 127.0.0.1 in CI implmentation?
#1

[eluser]Unknown[/eluser]
Hi all,

In my CI server I have configured the following:

$config['base_url'] = 'http://127.0.0.1';

I have written several pages. Now under most circumstances, I can access the webpages normally by using both http://127.0.0.1/welcome and http://localhost/welcome, no problem. However, once I introduce sessions, then the 'localhost' one just does not work. Anyone knows why? Thanks a lot in advance.
#2

[eluser]Unknown[/eluser]
if do that, try do this :

$config[‘base_url’] = ‘’;
fill empty on $config['base_url']

CMIIW
#3

[eluser]Ajaxboy[/eluser]
Yeah use http://127.0.0.1, some times localhost has issues with sessions or cookies
#4

[eluser]InsiteFX[/eluser]
You may need to edit your host file if you are running windows 7 !
Code:
// use notepad to edit...
c:\Windows\System32\drivers\etc\hosts

// Add this!
127.0.0.1 localhost




Theme © iAndrew 2016 - Forum software by © MyBB