Cookies and redirect - not setting cookie.

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

    #1

    Cookies and redirect - not setting cookie.

    Hi,

    I've got the following code :

    if (empty($g_view_ all_cookie_val) ) {
    $t_settings_str ing = "v1#any#any#any #";
    setcookie($g_vi ew_all_cookie, $t_settings_str ing/**
    * DG, time()+$g_cooki e_time_length
    */);
    print_header_re direct($g_view_ all_page . "?f=2");
    }

    I am running this on PHP, IIS5 on windows 2000 server. When I run the
    page it goes into a loop, it seems that the $g_view_all_coo kie_val var
    never gets set. If I run the same pages on II6 on Windows XP it runs
    ok. Can anyone help me?

    Thanks.
  • Ian.H

    #2
    Re: Cookies and redirect - not setting cookie.

    On Fri, 27 Aug 2004 02:35:43 -0700, Gurtch wrote:
    [color=blue]
    > Hi,
    >
    > I've got the following code :
    >
    > if (empty($g_view_ all_cookie_val) ) {
    > $t_settings_str ing = "v1#any#any#any #";
    > setcookie($g_vi ew_all_cookie, $t_settings_str ing/**
    > * DG, time()+$g_cooki e_time_length
    > */);
    > print_header_re direct($g_view_ all_page . "?f=2");
    > }
    >
    > I am running this on PHP, IIS5 on windows 2000 server. When I run the
    > page it goes into a loop, it seems that the $g_view_all_coo kie_val var
    > never gets set. If I run the same pages on II6 on Windows XP it runs
    > ok. Can anyone help me?
    >
    > Thanks.[/color]


    Old.. obsolete code probably. RTFM.



    Regards,

    Ian

    --
    Ian.H
    digiServ Network
    London, UK


    Comment

    • kingofkolt

      #3
      Re: Cookies and redirect - not setting cookie.

      "Gurtch" <van_wyk_gerhar d@hotmail.com> wrote in message
      news:e6e21b04.0 408270135.4cb8d 823@posting.goo gle.com...[color=blue]
      > Hi,
      >
      > I've got the following code :
      >
      > if (empty($g_view_ all_cookie_val) ) {
      > $t_settings_str ing = "v1#any#any#any #";
      > setcookie($g_vi ew_all_cookie, $t_settings_str ing/**
      > * DG, time()+$g_cooki e_time_length
      > */);
      > print_header_re direct($g_view_ all_page . "?f=2");
      > }
      >
      > I am running this on PHP, IIS5 on windows 2000 server. When I run the
      > page it goes into a loop, it seems that the $g_view_all_coo kie_val var
      > never gets set. If I run the same pages on II6 on Windows XP it runs
      > ok. Can anyone help me?
      >
      > Thanks.[/color]

      I don't see where $g_view_all_coo kie_val is getting set in this code...


      Comment

      • Andy Hassall

        #4
        Re: Cookies and redirect - not setting cookie.

        On 27 Aug 2004 02:35:43 -0700, van_wyk_gerhard @hotmail.com (Gurtch) wrote:
        [color=blue]
        >I've got the following code :
        >
        >if (empty($g_view_ all_cookie_val) ) {
        > $t_settings_str ing = "v1#any#any#any #";
        > setcookie($g_vi ew_all_cookie, $t_settings_str ing/**
        > * DG, time()+$g_cooki e_time_length
        > */);
        > print_header_re direct($g_view_ all_page . "?f=2");
        >}
        >
        >I am running this on PHP, IIS5 on windows 2000 server. When I run the
        >page it goes into a loop, it seems that the $g_view_all_coo kie_val var
        >never gets set.[/color]

        Are you running PHP as CGI? If so, this could be relevant:


        [color=blue]
        >If I run the same pages on II6 on Windows XP it runs
        >ok. Can anyone help me?[/color]

        XP has IIS 5.1; isn't Windows 2003 the only one with IIS 6.0?

        --
        Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
        <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

        Comment

        Working...