Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP, IIS, and Cookies

David
Guest
 
Posts: n/a
#1: Sep 4 '05
I know that this is an reoccurring issue, but I need to get PHP 5
running under IIS 5.x. This machine hosts a asp.net 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
permissions?

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?

Thanks



NC
Guest
 
Posts: n/a
#2: Sep 4 '05

re: PHP, IIS, and Cookies


David wrote:[color=blue]
>
> 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) .."[/color]

What does line 5 in php1.php look like?

Cheers,
NC

Closed Thread