Cookie issues

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
freakofnature
Forum Newbie
Posts: 4
Joined: Thu Mar 18, 2004 10:03 am
Location: Syracuse NY

Cookie issues

Post by freakofnature »

I am developing a site on a webhost that is already set up (Linux). I have taken the code and moved it to my home windows box, installed the latest PHP, Apache 1.3, MySQL, etc. The code isn't working right on the Windows box. At first, the post, get, and cookies weren't working. Then I added the line:

import_request_variables('GCP');

and now the get and post variables are working. My problem now is that $_COOKIE is always empty. Is there something specific I need to do to enable this?
TheBentinel.com
Forum Contributor
Posts: 282
Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio

Post by TheBentinel.com »

There's a domain associated with a cookie. If you leave it blank, I think it puts out whatever domain you're on at the time. But if it's filled in, it might not be finding it.

In other words, is your code trying to drop a cookie for domain "TheRealSite.com" but you're trying to read it from "localhost"?
Post Reply