Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2004
Posts: 13
Newbie
Newbie
Offline
Joined: Feb 2004
Posts: 13
Hi, I'm using UBBthreads 6.4.1 and php 4.3.4. I tried using sessions instead of cookies and originally it wouldn't let me log in and this is the error message I got:

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

I went in php.ini and turned on register_globals. I read using register_globals is unsafe and would prefer not to have it on. Is there any way to have sessions work without register_globals enabled?

Any help would be much appreciated. Thanks
CoralineSage

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
AFAIK you don't need to have register_globals enabled with threads.
So you should be fine with turning the warnings off as statement in the waring message. To avoid these warnings, the session handling in ubb.threads needs to be updated so that $_SESSION is used instead.

Joined: Feb 2004
Posts: 13
Newbie
Newbie
Offline
Joined: Feb 2004
Posts: 13
Hi Astaran,

Thanks for the reply. Where can I update the session handling in ubb.threads? Is that a one file update or do you mean that I have to go through all the files that check for live sessions? I found session references on ubbt.inc.php but I'm not sure what I had to edit.

Let me know if you can help. Thank you so much for your time.

CoralineSage

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
You'll need to do that in several files.
ubbt.inc.php, postlist.php, domarkallread.php, showflat.php, showthreaded.php

It should if you replace the session_register calls with something like this
$_SESSION['myvariable'] = $myvalue;



Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)