Click to See Complete Forum and Search --> : sessions dissapear ?


madsosterby
06-27-2002, 03:52 AM
Im running Windows 98, PHP 4.2.1, apache 1.3.26. (sessions enabled, no errors)

Problem: When going to another page, the session disapear ?

Im using same code on another (linux, php 4.1) server, and it works fine.

page 1
<?php
session_start();
session_register("test");
$test = "session tester";
?>

page 2
<?php
session_start();
echo $test;
?>

Why is it not working? (php4.2.1 != php4.1)?

How to solve it ?

Can anyone try it on a win 98, php4.1, apache 1.3.26 ?

Anon
06-27-2002, 04:54 AM
I'm having the same problem, but i'm using php4.2.1 with IIS...
Please help!!

madsosterby
06-27-2002, 05:46 AM
I tried to install php4.06 and php4.1.2 on the W98 machine. (using the same php.ini, copying the right php4ts.dll file over to windows/system/)

I got the same result.. it still couldnt find the session on the next page.

(btw. Im using virtual host - if that could have any thing to do?)

willythemax
06-27-2002, 09:47 AM
Maybe you should try using the SID variable at the end of the link to the page. It should appear like this:

<A href="page2.php?<?=SID?>">

anyway, you have to make the session number be known by the second page.

Anon
06-27-2002, 10:28 AM
Read what I found back in March :-) Follow the thread

http://www.phpbuilder.com/forum/read.php3?num=1&id=136764&loc=0&thread=136764

Happy Coding
/Andrin

Anon
06-27-2002, 10:42 AM
Also see:

http://bugs.php.net/bug.php?id=16890