Php Sessions?

Discussion in 'Installation/Configuration' started by the_idol, May 5, 2006.

  1. the_idol

    the_idol New Member

    I can't seem to make sessions work.
    Perfect Centos 4.3 86_x64 install
    ispconfig install no problems



    I am using this simple script
    Code:
    <?php
    session_start( );
    ?>
    <html>
    <head>
    <title>test session </title>
    </head>
    <body>
    <?php
    print "Session number: ";
    print $PHPSESSID;
    ?>
    <br />
    <?php
    session_register("username");
    $username = "admin";
    print "Your name is: ";
    print $username;
    ?>
    </body>
    </html>
    Site config:

    Shell
    Cgi Scripts
    Php Scripts
    SSI
    FTP
    MYSQL
    SSL


    The script is in web/foo/script.php

    Any Help would be great

    The Idol
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What makes you think this? Any errors?
     
  3. the_idol

    the_idol New Member

    Results below, forgot to post


    Session number:
    Your name is: admin


    The Idol
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try to replace:

    print $PHPSESSID;

    with:

    print session_id();
     
  5. the_idol

    the_idol New Member

    Welcome to session number: 448a813333b4d2326ff4361d25b71110
    Your name is: admin


    That worked ??

    Why is that


    The Idol
     
  6. the_idol

    the_idol New Member

    Found out why, Register Globals is off


    Thanks,,
    The Idol
     

Share This Page