Thread: phpinfo();

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

    Join Date
    Jul 2000
    Location
    Pune, Maharashtra, India
    Posts
    4
    Rep Power
    0
    Hi,
    I have php4 installed and when i type in phpinfo();, it shows me all the details of my computer. I have sessions enabled. But when i try to run a page using sessions. I get an error message. The script that i used was from the site and was something like this:
    <?
    session_register("count");
    $count++;
    ?>


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

    Can anyone tell why i get this error even after having session enabled.
    Thanks in advance,
    Derek
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<Can anyone tell why i get this error even after having session enabled.
    >>


    You will have to use session_start() before register it..

    eg:

    <?php

    session_start();
    $my_variable= "1";
    session_register( "my_variable");

    ?>


    Before getting the session value agian you should use session_start()

    <?php

    session_start();
    print $my_variable";

    ?>

    i hope this will help you to solve your problem.


    Good Luck!!


    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited July 28, 2000).]

Similar Threads

  1. phpinfo without phpinfo
    By BCheng in forum PHP Development
    Replies: 5
    Last Post: November 13th, 2003, 12:20 PM
  2. phpinfo users security
    By the-griff in forum PHP Development
    Replies: 2
    Last Post: May 24th, 2003, 06:27 PM
  3. PHP Bug? EasterEgg? phpinfo()
    By johan in forum PHP Development
    Replies: 3
    Last Post: April 18th, 2002, 02:33 PM
  4. php.ini and phpinfo()
    By Jay Edgar in forum PHP Development
    Replies: 3
    Last Post: September 10th, 2001, 01:33 PM
  5. phpinfo
    By TD_Paladin in forum PHP Development
    Replies: 6
    Last Post: August 12th, 2001, 03:46 AM

IMN logo majestic logo threadwatch logo seochat tools logo