php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42388 $_ SESSION don't registry variable from array and don't report error
Submitted: 2007-08-22 19:57 UTC Modified: 2007-08-22 20:05 UTC
From: sica at wnet dot com dot br Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.7 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sica at wnet dot com dot br
New email:
PHP Version: OS:

 

 [2007-08-22 19:57 UTC] sica at wnet dot com dot br
Description:
------------
$_ SESSION don't registry variable from array and don't report error

Reproduce code:
---------------
$pesquisa  = "SELECT indice FROM sica_cadastro WHERE login='$login'";
$resultado = mysql_query($pesquisa) or exit(mysql_error());
$dados     = mysql_fetch_assoc($resultado);
// it's not working
$_SESSION['s_indice'] = $dados['indice'];
// it don't work
// but don't report error


Expected result:
----------------
registry a variable

Actual result:
--------------
$pesquisa  = "SELECT indice FROM sica_cadastro WHERE login='$login'";
$resultado = mysql_query($pesquisa) or exit(mysql_error());
$dados     = mysql_fetch_assoc($resultado);
// it's working
$indice    = $dados['indice'];
$_SESSION['s_indice'] = $indice;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-22 20:05 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

As long as there\'s no session_start() $_SESSION is a regular variable without special meaning
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 00:01:31 2025 UTC