php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22142 Error in to register variables of sessions in functions
Submitted: 2003-02-09 22:04 UTC Modified: 2003-02-10 10:29 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: zero_bala at uol dot com dot br Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.2 OS: Linux 2.4.18
Private report: No CVE-ID: None
 [2003-02-09 22:04 UTC] zero_bala at uol dot com dot br
file1.php
----------
<?
session_start();

function inicio() 
 {
  $name="Paulo";
  session_register("name");
 }

inicio();
?>
----------
file2.php
----------
<?
session_start();
echo "Name: " . $name;
session_destroy();
?>
----------

The list of modules
-------------------
./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd=../gd-1.8.4' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-imap=../imap-2001.BETA.SNAP-0105220031' '--with-mcrypt' '--with-ming=../ming-0.1.1' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-safe-mode' '--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-zlib'

Thank's
by Paulo Augusto Borges Soares

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-09 22:21 UTC] magnus@php.net
Do you have register_globals = on ? 
 [2003-02-09 22:46 UTC] zero_bala at uol dot com dot br
yes, meu phpinfo() is: http://www.aguiara.com.br/teste/informa.php
 [2003-02-10 10:29 UTC] sniper@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 4.3.0 was released long time ago..

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Jan 01 14:00:01 2026 UTC