Welcome Guest, Not a member yet? Register   Sign In
Site works locally, but not from remote machine -- no cookies
#1

[eluser]MatBeard[/eluser]
I'm working on a CI-based site and I'm wanting to test it on the production server.

It works fine on my local machine (Windows 7, IIS) but the session cookies are not working when I've transferred it to the remote server (Windows 2008, IIS).

This is not quite the same as similar problems I've seen reported, because if I access the site from the remote server via RDP (i.e. locally) it works as expected. So the session cookie is only working when the site is accessed from the local machine.

I've checked in Chrome's 'Resources' and there is definitely no cookies when accessing the site remotely.

I have another standard PHP site on the same server (not CI) and it creates the PHP session cookie perfectly well.

Any ideas?

Thanks in advance.

UPDATE: Just for additional info -- I have Sqlbuddy in a folder in the same site. When I access this, it sets the standard PHPSESSID cookie, so this seems to be a Codeigniter-only issue.
#2

[eluser]MatBeard[/eluser]
SOLVED! This was driving me crazy, but it turns out it was simply because the clock on the remote server was wrong (out by 2 days).

I don't know if it's worth adding anything to the Session docs to watch out for this if cookies/sessions aren't working.

Thanks anyway.
#3

[eluser]arkin[/eluser]
Its strange that your sessions would work at all on the basic PHP site, it must have had a high expiry range.

Uncommon error though, as most servers sync time with a remote time server nowadays.




Theme © iAndrew 2016 - Forum software by © MyBB