473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Error:Unknown: Your script possibly relies on a session side-effect which existed unt

250 100+
I developed web application using php. But some pages display a error message.

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

Could some one help me? Still I couldn't find what is the wrong with my code.
Aug 8 '08 #1
7 7335
pbmods
5,821 Expert 4TB
Heya, ghjk.

Check out the comments on the Sessions page of the PHP Manual (http://php.net/manual/en/ref.session.php#55239).
Aug 8 '08 #2
The error only appears when you try to update a session variable using 'NULL' value
and try to assign a value to the same named variable in the global scope.
like below. I found this in another site. It worked for me.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.     session_start();
  3.     $_SESSION['sample'] = NULL;
  4.     $sample ="simple";
  5. ?>
  6.  
Aug 8 '08 #3
ghjk
250 100+
The error only appears when you try to update a session variable using 'NULL' value
and try to assign a value to the same named variable in the global scope.
like below. I found this in another site. It worked for me.
[PHP]
<?php
session_start();
$_SESSION['sample'] = NULL;
$sample ="simple";
?>
[/PHP]

yes. That's the error. Thanx a lot .
Aug 12 '08 #4
We had just come across this problem with a particular website we are developing and believe that we know of the main cause as we have never received this error before and try to test most limits on development.

The Problem Code:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   $orderItem = $_SESSION["orderItem"];
  3.   $orderPrice = $_SESSION["orderPrice"];
  4. ?>
The Fixed Code:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   $SorderItem = $_SESSION["orderItem"];
  3.   $SorderPrice = $_SESSION["orderPrice"];
  4. ?>
Basiclly we have until now used the exact same name for a session variable in this way, But seems this was the cause of the error for us.

Hope this helps a few people around?
<link removed - no unnecessary links please>
Mar 3 '09 #5
cell1
2
I am getting this error in my Joomla based web site, skicow.com. I can't see any direct assignments to/from $_SESSION using the same key as the assigned variable, however, there are assignments such as the following in the Joomla code:

$session_id = mosGetParam( $_SESSION, 'session_id', '' );

Can anyone tell me if this will cause the errors?
Dec 25 '09 #6
Markus
6,050 Expert 4TB
@cell1
Based on the previous replies to this thread, I guess it will cause the error. I suspect the code you posted would expand to something like
Expand|Select|Wrap|Line Numbers
  1. $session_id = $_SESSION['session_id'];
which seems to be problematic.

I think if you turn register_globals off, you will circumvent this issue.
Dec 26 '09 #7
cell1
2
Well the code in the mosGetParam function assigning the variable is:

$return = $arr[$name];

where $arr is a parameter taking $_SESSION (or anything else) and return is passed back as the function's result.

Obviously the effect is the same as $session_id = $_SESSION['session_id'], however, I was wondering if the intermediate variables would fool the PHP runtime enough to prevent the warnings.
Dec 26 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marek Baczek Baczyński | last post by:
:map ,p :!python % <cr> ,p #v+ C:\COMMAND.COM /c python items.py Fatal Python error: unknown scope for super in __init__(14) in items.py symbols: {'multirandrange': 264} locals: {} globals:...
0
by: clare_5342 | last post by:
Has anyone run into this situation and could possibly help me out? I am running on w2k vf mssql Description: Error: Script Engine Exception. A ScriptEngine threw expectio 'C0000005' in...
0
by: Nick | last post by:
In the last days I've found this error more and more often, but it never occured before and I didn't make any important change in the scripts (it's a CMS developed by me ant it works with no...
0
by: Angel | last post by:
Hi I have a problem with my web applications. I believe the problem is somehow connected to HttpSession. I use form authentication in my project. Once I authenticate the user and redirect to...
5
by: Larry in Honolulu | last post by:
I'm getting an error message that makes no sense to me. I have a table with a field named 'testkey' for a list of "keys" in the form of ABC10102. I have a php variable holding a specific key...
1
by: NUKhan | last post by:
Hello Friends I uninstalled a trial program that also removed some shared files of MSACCESS. My program in VB6 with MSACCESS database stopped working. When I open a database table in MSACCESS, it...
1
by: Valli | last post by:
Hi, I have an issue with the content page('default.aspx') while executing the asp.net project. I am getting the error 1. unknown server tag 'asp.Scriptmanager' 2. unknown server tag...
1
by: suvarna1026 | last post by:
Can any one plz tell me why I am getting this error,and what is the meaning of this error--- Session state has created a session id, but cannot save it because the response was already flushed by...
20
by: vjayis | last post by:
hi when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me., here is my javascript code., ...
3
nomad
by: nomad | last post by:
Hello everyone: I new to PHP and I'm reading a book on PHP Bibles 2nd edition. It has to deal with a user-rating system. There are 4 scripts to it. I'm getting an error Unknown column...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.