PHP, IIS, and Cookies

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I know that this is an reoccurring issue, but I need to get PHP 5
running under IIS 5.x.  This machine hosts a project, but it
also has a few php pages under a sub-domain.  The PHP works fine
except for  cookes and session information.

When I attempt to write a cookie  

setcookie("filename01", $filename,time() + 3000);

 I get the message

Warning: Cannot modify header information - headers already sent by
(output started at c:\Inetpub\wwwroot\php1\php1.php:5) .."

I assume that this is an IIS issue as the same code works OK on a
linux machine.  I set permissions for the session directory so that
the IIS process has full access, but I am unsure what else is needed.
Do I need to modify the php.ini settings or reset some of the IIS

Also, the machine does not appear to generate a session id, eg. when I
print the "session_id()" information, it is blank.  Is this also an
IIS issue?


Re: PHP, IIS, and Cookies

David wrote:
Quoted text here. Click to load it

What does line 5 in php1.php look like?  


Site Timeline