- Are the operating system, PHP, web server versions all identical between development and production?
- Is the PHP build the same between development and production (i.e. at least identical build options, preferably the same binary)
- Are all PHP and web server configuration options identical between development and production?
If the answer to any of these is "No", then you need further work to get a properly consistent development environment.
Another possibility might be that (despite everything being the same on the sevrer) the behaviour of the browser is different on a server called "localhost" - this is certainly the case (often) in Internet Explorer.
I recommend you set up a domain name for your development site which is similar to production (don't register one, just use an internal-only name only visible to you and/or your colleagues- run a private DNS or uses a "hosts" file if you really want to). In particular, it should be in the same top-level domain and contain the same number of dots (or maybe more is ok). Cookies behave in a way which is dependent (to some extent) domain names.
Mark