Edit report at https://bugs.php.net/bug.php?id=61155&edit=1

 ID:                 61155
 Updated by:         [email protected]
 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

Reply via email to