create the variable then register it, not the other way around.

also a great function for checking arrays is print_r()

print_r($HTTP_SESSION_VARS);

--

  Chris Lee
  [EMAIL PROTECTED]



"Ross Barefoot" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Summary: when I write scripts using sessions and run them on my web host
the
> session is created, a session file is opened, but the session file is 0
> bytes and therefore the session variables are not being passed.  When the
> tech support guys at the host run the same script they work, even when
> dialing out through an external isp.  They run the same scripts and the
> session file is created with the session variables intact.
>
> When I run my scripts on a different hosting company, or using the Apache
> server on my local machine, they process fine.
>
> I set up two test scripts to try and resolve this, but after three days of
> trying, and many hours expended by both myself and the host's tech
support,
> we find no reason.  We have tested different browsers, locations, ISP's,
> OS's.  We've ruled out a cookie problem, so no need to go there.
>
> Here are the two test scripts I've set up:
> http://www.flexiss.net/page1.php
> <?
> session_start();
> session_register("test_var");
>
> $test_var = "Testing 1-2-3...";
>
> print "the content of \$test_var is $test_var<BR>";
> ?>
>
> <A HREF="page2.php">Next Page</A>
>
> (end of page1.php)
>
> Here's page2.php
> <?
> session_start();
> print "the content of \$test_var is $test_var<BR>";
>
> $count = count($HTTP_SESSION_VARS);
>
> print "the count of elements in \$HTTP_SESSION_VARS is $count";
>
> print "<BR>the session id is: " . $PHPSESSID;
>
> print "<BR>" . $HTTP_SESSION_VARS['test_var'] ;
> ?>
>
> If you run these scripts you may get correct results, but I and other test
> users at different locations using different machines get the session id,
> but a count of 0 elements in $HTTP_SESSION_VARS and therefore nothing is
> passed.
>
> If you want to look at how the php is set up, you can go to this link:
> http://www.flexiss.net/phpinfo.php
>
> Any help would really be appreciated.  I've posted this on two PHP forums
> without a solution being found.
>
> Ross
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to