Bug #61155 [Opn->Nab]: session_strat gives error
| From: | aharvey@php.net | Date: | Tue, 21 Feb 2012 15:27:39 +0000 |
| Subject: | Bug #61155 [Opn->Nab]: session_strat gives error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167702@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61155&edit=1
ID: 61155
Updated by: aharvey@php.net
Reported by: elcmusic at inter dot net dot il
Summary: session_strat gives error
-Status: Open
+Status: Not a bug
Type: Bug
Package: Session related
Operating System: Server Version: Apache/2.2.11
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
As the warning says, disable session.bug_compat_42 (after making sure your code
doesn't rely on it) and the warning will go away.
Previous Comments:
------------------------------------------------------------------------
[2012-02-21 15:25:13] elcmusic at inter dot net dot il
Description:
------------
---
From manual page: http://www.php.net/function.session-start
---
I'm using session_start(); and some times when a $_SESSION param is EMPTY I get this error:
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP
4.2.3. Please be advised that the session extension does not consider global variables as a source
of data, unless register_globals is enabled. You can disable this functionality and this warning by
setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Test script:
---------------
session_start();
//error_reporting(0);
//session_unset ();
$_SESSION['product'] = $_SESSION['form'];//received from prev. page this is the
bug when ['form'] is empty or not defined
include('do-csv.php');// save $_GET in a csv file
include('do-Scsv.php');// save $_SESSION in a csv file
Expected result:
----------------
no warning should be output.
Actual result:
--------------
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP
4.2.3. Please be advised that the session extension does not consider global variables as a source
of data, unless register_globals is enabled. You can disable this functionality and this warning by
setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61155&edit=1