php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16839 Session, Get & Post doesn't work
Submitted: 2002-04-25 21:13 UTC Modified: 2002-04-25 21:25 UTC
From: shinjie at hotmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.0 OS: Windows NT 5.0 build 2195
Private report: No CVE-ID: None
 [2002-04-25 21:13 UTC] shinjie at hotmail dot com
in Release Candidates of 4.2.0, the Session, Get & Post still works. But after upgrading to 4.2.0, Session, Get & Post doesn't work at all. Such as some basic codes:
<?
   //test1.php
   session_start();
   session_register("var");
   $var = 1234567;
?>
<?
   //test2.php
   session_start()
   echo $var; <------- nothing outputed, worked in 4.1.2 well
?>
---------------------------------------------
//t1.php
<form action="./t2.php" method="Post">
   Your Name: <input type="text" name="name" size="20">
   <input type="submit" value=" OK ">
</form>
//t2.php
Your name input: <? echo $name; ?> //Variable is null!
Even: t2.php?name=Tommy
Nothing shown........damn......
I've updated all modules from 4.1.2....php4apache.dll, php.ini, php4ts.dll......

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-25 21:25 UTC] rasmus@php.net
Turn on register_globals or use $_SESSION['var'] in test2.php
 [2002-06-28 03:57 UTC] n dot rehmann at web dot de
I'm not sure if this is the problem
but try it like this

//test2.php
session_start()
session_register("var");
echo $var; <------- nothing outputed, worked in 4.1.2 well
 [2003-03-14 05:56 UTC] lotus at php dot de
<?
   //test1.php
   session_start();
   session_register("var");
   $var = 1234567;
?>
<?
   //test2.php
   session_start()
   echo $var; <------- nothing outputed, worked in 4.1.2 well
?>
 you cant register a $var, $var is empty 
try it so:
<?
   //test1.php
   session_start();
   $var = 1234567;
   session_register("var");
   
?>
<?
   //test2.php
   session_start()
   echo $var; // out: 1234567;
?>

good luck
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC