PHP, IIS, and Cookies

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    PHP, IIS, and Cookies

    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("file name01", $filename,time( ) + 3000);

    I get the message

    Warning: Cannot modify header information - headers already sent by
    (output started at c:\Inetpub\wwwr oot\php1\php1.p hp: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

    #2
    Re: PHP, IIS, and Cookies

    David wrote:[color=blue]
    >
    > When I attempt to write a cookie
    >
    > setcookie("file name01", $filename,time( ) + 3000);
    >
    > I get the message
    >
    > Warning: Cannot modify header information - headers already sent by
    > (output started at c:\Inetpub\wwwr oot\php1\php1.p hp:5) .."[/color]

    What does line 5 in php1.php look like?

    Cheers,
    NC

    Comment

    Working...