View Full Version : Warning: Unknown: Your script possibly relies on a session side-effect which existed
coldgansta
Aug 6th 2007, 4:03 pm
I have this warning at the botom of my home-page
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
Plz advise to remove this.
Thanks
viponline
Aug 9th 2007, 12:38 am
do NOT turn off session.bug_compat_warn
it states clear that in all versions below PHP 4.2.3 extensions does not consider global variables as a source of data
hope that helps
coldgansta
Aug 9th 2007, 1:09 am
do NOT turn off session.bug_compat_warn
it states clear that in all versions below PHP 4.2.3 extensions does not consider global variables as a source of data
hope that helps
Sorry but no it dont help,as ime somewhat a noob with php.
I need a answer for this problem that a nooby like me can fix.
Thanks
coldgansta
Aug 9th 2007, 9:46 am
some1 must have a fix for this
EGS
Aug 10th 2007, 9:45 am
Upgrade to a newer version of PHP.
Dan-Da-Man
Aug 13th 2007, 6:37 am
upgrade and make sure ur server/hosting is set to php enabled
projectshifter
Aug 13th 2007, 3:24 pm
You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off
In your php.ini files set session.bug_compat_warn = Off
It sounds like it's a register_globals issue, which the 'jist of it means if the url is like index.php?var=val, then it makes the variable $var and gives it the value 'val' (when register globals is on), otherwise you use $_GET['var'] to access the data, which is more proper and more secure, it just sounds to me like it's something similar but for sessions, I've never heard of it, but then it's really old and antiquated PHP and it was mainly done by lazy or inexperienced coders.
aquasonic
Sep 3rd 2007, 3:58 pm
Yay! I'm obviously lazy - I'm getting this error in my error log too!
The trouble is - it's not obvious which file is causing the error?
PHP 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
It seems to be a harmless error as I've had no problems with any of my website, but yet this error keeps cropping up.
Oh well... as long as it's not causing a noticeable error - I'm happy!
coldgansta
Sep 3rd 2007, 10:21 pm
I solved this error.And thank all for your replys and help.
The fix.
Make a new file called ini.php
add this code
session.bug_compat_42 = 1
session.bug_compat_warn = 0
it works for my site.I have atached the file to this thread if any1 need it
nisshongo
Apr 4th 2009, 10:46 pm
Thanks! I was also looking for a code to deactivate this unnecessary warning. Your code worked fine.
vaneXsa
Jul 23rd 2009, 2:37 am
Hi Goldgansta,
can you plz tell me after creating the ini.php file, where shall i place ? Does it need to be include in the respective file ? or the folder...
Thanks for your quick help
coldgansta
Jul 23rd 2009, 2:47 am
Hi Goldgansta,
can you plz tell me after creating the ini.php file, where shall i place ? Does it need to be include in the respective file ? or the folder...
Thanks for your quick help
Place the file inside your public_html folder.
It should work if not i can have a look for you!
skinsey1
Oct 28th 2009, 5:08 pm
I found this by trying to resolve the issue of the error message of:
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
After reviewing these post and attempting to resolve the issue stated above it did not work for me. Here is how I finally resolved the issue.
added these two lines of code to my .htaccess file in the root directory
php_flag session.bug_compat_42 1
php_flag session.bug_compat_warn 0
coldgansta
Oct 31st 2009, 3:21 am
I found this by trying to resolve the issue of the error message of:
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
After reviewing these post and attempting to resolve the issue stated above it did not work for me. Here is how I finally resolved the issue.
added these two lines of code to my .htaccess file in the root directory
php_flag session.bug_compat_42 1
php_flag session.bug_compat_warn 0
Yes that option also works if you hosting company does not allow custom ini.php
Thanks for adding that fix it will come in handy for those situations..:)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.