#42388 [NEW]: $_ SESSION don't registry variable from array and don't report error
| From: | sica at wnet dot com dot br | Date: | Wed, 22 Aug 2007 19:57:05 +0000 |
| Subject: | #42388 [NEW]: $_ SESSION don't registry variable from array and don't report error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-116496@lists.php.net to get a copy of this message | ||
From: sica at wnet dot com dot br
Operating system: linux
PHP version: 4.4.7
PHP Bug Type: Session related
Bug description: $_ SESSION don't registry variable from array and don't report error
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;
--
Edit bug report at http://bugs.php.net/?id=42388&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42388&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42388&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42388&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42388&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42388&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42388&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42388&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42388&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42388&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42388&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42388&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42388&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42388&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42388&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42388&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42388&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42388&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42388&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42388&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42388&r=mysqlcfg