#33460 [Opn]: rescuing the session
| From: | leandroregal at gmail dot com | Date: | Fri, 24 Jun 2005 04:01:03 +0000 |
| Subject: | #33460 [Opn]: rescuing the session | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80945@lists.php.net to get a copy of this message | ||
ID: 33460
User updated by: leandroregal at gmail dot com
Reported By: leandroregal at gmail dot com
Status: Open
Bug Type: Session related
Operating System: red hat 9.0
PHP Version: 4.3.10
New Comment:
in this server (http://www.bovrastro.com.br/page1.php) using php 4.3.4
the session works like i need for both links but in this server
(http://www.internel.com.br/page1.php) using php 4.3.10 works only with
first link.
Previous Comments:
------------------------------------------------------------------------
[2005-06-24 05:51:49] leandroregal at gmail dot com
Description:
------------
i'm having problems to set a session with password, i cant create a
session with any value. it seems as it was not been registered. when i
go to the next page to verify the creation of session return no
confirmation of any session. i have the PHPLIVESUPPORT installed and it
uses the session to save the session login but neither this software
works and in other servers the same software works.
Reproduce code:
---------------
// page1.php
session_start();
echo 'Bem vindo a pagina #1';
$_SESSION['favcolor'] = 'green';
$_SESSION['animal'] = 'cat';
$_SESSION['time'] = time();
// Funciona se o cookie de seção foi aceito
echo '<br /><a href="page2.php">page 2</a>';
// Ou talves passando o ID da seção se necessário
echo '<br /><a href="page2.php?' . SID . '">page
2</a>';
============================
// page2.php
session_start();
echo 'Bem vindo a pagina #2<br />';
echo $_SESSION['favcolor']; // green
echo $_SESSION['animal']; // cat
echo date('Y m d H:i:s', $_SESSION['time']);
// Você pode querer usar o SID aqui, como fissemos em page1.php
echo '<br /><a href="page1.php">page 1</a>';
Expected result:
----------------
i expected that in both links the value of session can be rescued but
only whith SID (2º link in page1.php) this works.
Actual result:
--------------
only with this header the session works
http://domain.com.br/page2.php?PHPSESSID=e35459b9a47b0ead914cf331243f1275
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33460&edit=1