Session_register Problem

From: Cenker Sisman (groups_at_cenker.com)
Date: 10/31/03


Date: 31 Oct 2003 03:01:57 -0800

My problem is I cannot set session variables correctly.
I have tried both PHP 4.2.2 and 4.3.3, with register_global is ON.
But I cannot manage to see the desired result.
My configuration for PHP 4.2.2 is
Redhat Linux 8.0
apache_1.3.28
php 4.2.2

What I am doing wrong ?
Thank you in advance,
Cenker Sisman

FIRST CODE: deneme.php
<?
 ini_set('display_errors', 1);
 ini_set('log_errors', 0);
 ini_set('error_reporting', E_ALL);

session_start();
session_register("sdeneme");
$sdeneme='DENEME';
header("Location: deneme1.php");
?>

SECOND CODE: deneme1.php

<?
 ini_set('display_errors', 1);
 ini_set('log_errors', 0);
 ini_set('error_reporting', E_ALL);
session_start();
echo ($sdeneme);
?>

BROWSER OUTPUT
Notice: Undefined variable: sdeneme in /www1/htdocs/deneme1.php on line 8



Relevant Pages

  • Session_register problem
    ... My problem is I cannot set session variables correctly. ... I have tried both PHP 4.2.2 and 4.3.3, ... FIRST CODE: deneme.php ... BROWSER OUTPUT ...
    (comp.lang.php)
  • Re: Serving ZIP files to IE using PHP
    ... The @ char before a function in PHP supresses any errors/ warnings that ... We're not looking for browser output here and I don't need the error ... so to keep PHP quiet just incase.. ... other considerations I needed to take into consideration etc =) ...
    (comp.lang.php)