I'm writing a forum system and have had it working previously on other machines. But I installed IIS (5.0) on Windows 2000 Professional with php 4.3.3 running (CGI version, not ISAPI) and wanted to run my system.
mySQL is running fine and the php is selecting/updating fine to the database, so there's nothing wrong with mySQL and PHP.
However, PHP doesn't seem to want to set the cookies at all. I'm not using sessions either. I know for a fact the PHP is validating the information with the database (checked it by echoing everything being done) but the cookies just aren't being set.
Here's the code I use to set a cookie:
$time = time() + 365 * 86400;
setcookie("IBS_COOKIE_USER", $name, $time);
setcookie("IBS_COOKIE_EMAIL", $email, $time);
Here's the code I use to refer to a cookie:
$user_name = $IBS_COOKIE_USER;
Note that I've had this exact system running previously and haven't changed it since. I've also made sure that my broswer (IE) accepts all cookies and security settings are low as possible.
Anyone any idea why this is happening and what can be done to fix it?