#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    3
    Rep Power
    0
    I'm having problems getting automatic sessions working in PHP.

    Sessions are working as expected if I tag every uri with <?php echo SID ?>, and work fine when I have cookies enabled. When I turn off cookies, though, the session fails to be automatically appended to the URI.

    I've recompiled php with --enable-track-vars' and '--enable-trans-id', and echo the value of SID show that it is being set, but with a new value every page unless cookies are turned on.

    The file I am using to test is:

    ----start file
    <?php
    session_register ("count");
    $count++;
    ?>

    Hello visitor, you have seen this page <?php echo $count; ?> times.<p>

    To continue, <A HREF="nextpage.php">click here</A>
    ----end file

    Is this a known issue with this version and should I go up to 4.0.2? I can find no mention of it in the list of changes at http://www.zend.com/zend/list_change_401.php.
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    There have been several bugs reported with -trans-id that were "supposed" to be fixed in 4.0.2 but I haven't compiled 4.0.2 yet so can't say for sure. You are right, the list of changes/fixes for 4.0.2 does not mention -trans-id.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    35
    Rep Power
    15
    Another question?

    How do u append the sessionid to url?
    I have no idea about it.

    thankx
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    The manual is a wonderful thing.

    <a href="somepage.php<?= SID?>">Some Page</a>

Similar Threads

  1. php authentication not working
    By dmehler in forum Development Articles
    Replies: 2
    Last Post: February 20th, 2004, 01:44 PM
  2. php sessions and security problems.
    By mochico in forum PHP Development
    Replies: 7
    Last Post: February 18th, 2004, 04:51 PM
  3. got apche working, php not
    By adiwood in forum Apache Development
    Replies: 4
    Last Post: February 10th, 2004, 01:14 PM
  4. xslt_set_encoding() not working on Win PHP 4.3.3
    By esosa in forum PHP Development
    Replies: 0
    Last Post: February 3rd, 2004, 05:46 PM
  5. POST method not working in PHP.
    By coremah in forum PHP Development
    Replies: 4
    Last Post: January 26th, 2004, 04:32 PM

IMN logo majestic logo threadwatch logo seochat tools logo