php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30353 Loosing the session
Submitted: 2004-10-07 18:08 UTC Modified: 2004-10-08 08:50 UTC
From: mani_he at yahoo dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.8 OS: Windows XP Home Edition
Private report: No CVE-ID: None
 [2004-10-07 18:08 UTC] mani_he at yahoo dot com
Description:
------------
I made 2 pages that both have to have a session.
on all pages I start the session_start();

So let see
I have page1.php and page2.php
on page1.php I start the session and I used the $_SESSION to ceate the session. and after that I use echo to see my session variable, when i go to page1.php

on page2.php again I start session_start(); and I try to echo my session in page2.php, But seems that I loose my session, or the connection is gone

I wondering that you guys can help me.
php.ini config
session.save_hander = files 
session.save_path = C:\WINDOWS\Temp 
sesion.use_cookies = 1 
session.name = PHPSESSID 
session.auto_start = 0 
session.cookie_lifetime = 0 
session.cookie_path = C:\WINDOWS\Temp\Coockies\ 
session.cookie_domain = none 
session.serialize_handler = php 
session.referer_check = 
session.entropy_length=0 
session.entropy_file = 
session.cache_limiter = private 
session.cache_expire = 180 
session.use_trans_sid = 0 

I'm using php 4.3.8 and mysql and apache 1.3 31 in windows Xp Home Edition

Thank You

Reproduce code:
---------------
//page1.php
<? session_start(); ?>
<html>
<body>
<?php 
$_session['user']= "NAME";
echo $_session['user'];
?>
<a href="page2.php">page2</a>
</body>
</html>
this page will show us the NAME

//page2.php
<? session_start(); ?>
<html>
<body>
<?php 
echo $_session['user'];
?>
<a href="page2.php">page2</a>
</body>
</html>


Expected result:
----------------
page1.php
I can see NAME


Page2.php
Nothing


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-08 08:51 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 14:01:32 2024 UTC