php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33460 rescuing the session
Submitted: 2005-06-24 05:51 UTC Modified: 2005-06-24 10:07 UTC
From: leandroregal at gmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.10 OS: red hat 9.0
Private report: No CVE-ID: None
 [2005-06-24 05:51 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-24 06:01 UTC] leandroregal at gmail dot com
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.
 [2005-06-24 10:07 UTC] tony2001@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 07:00:02 2025 UTC