When I open 1.php a 1K
file is created on the server and the contents
(my_session_variable|s:10:"some value";).
When I open 2.php afterwards a 0K file is created on the
server which is empty.
This is the problem. For some reason, the 2nd page is creating a new session when it shouldn't. Now the question becomes one of: what is causing the new session to be created?
in php.ini is session.use_cookies = 1
If not, try setting that then restarting apache.
Else is using trans_sid, you need to make a link in 1.php that takes you to 2.php in order for the magic to occur where ?PHP_SESSID=... gets added to the URL automatically. If you just type in 1.php and then type in 2.php the session variable is not automatically sent along.
--
Bill Rausch, Software Development, Unix, Mac, Windows
Numerical Applications, Inc. 509-943-0861 bill@numerical.com