Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 09:40 am EST
Geeklog Forums
GL register_globals=off compatible
I should have known by now that Geeklog requires register_globals=on to work properly but ...
Is it possible to make GL compatible with register_globals=off?
If so how complex this is and what needs to be changed?
Thanks a lot for your answers,
Robert
Geeklog Polish Support Team
Is it possible to make GL compatible with register_globals=off?
If so how complex this is and what needs to be changed?
Thanks a lot for your answers,
Robert
Geeklog Polish Support Team
5
4
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
The FAQ covers this situation.
If you have a normal Apache, it's even easier than messing around with php.ini
It should take you about 10 seconds to create/edit the file called .htaccess to put that line there.
Hopefully, Geeklog 2 would be made globals aware (i.e. use superglobals and declare on globals).
If you have a normal Apache, it's even easier than messing around with php.ini
It should take you about 10 seconds to create/edit the file called .htaccess to put that line there.
Hopefully, Geeklog 2 would be made globals aware (i.e. use superglobals and declare on globals).
6
6
Quote
Status: offline
Robin
Forum User
Full Member
Registered: 02/15/02
Posts: 725
Quote by LWC:If you have a normal Apache, it's even easier than messing around with php.ini
Unfortunatelly it's not on my server so no chance to mess with php.ini anyway.
Quote by LWC:It should take you about 10 seconds to create/edit the file called .htaccess to put that line there.
I've tried that on Apache once and it didn't work now I have no idea what server they use
Geeklog Polish Support Team
7
5
Quote
Status: offline
vinny
Site Admin
Admin
Registered: 06/24/02
Posts: 352
Location:Colorado, USA
Robin,
Back when Geeklog was first written, using registered globals was acceptable coding practice (and having register_globals=on the default). While all new code that goes into Geeklog is written to work with register_globals disabled, a lot of that old code will still not work. There is a lot of it. As we make changes (bug fixes and enhancements) to the code we try to remove the dependency on register_globals. However there is still a lot of places where Geeklog uses register_globals.
-Vinny
Back when Geeklog was first written, using registered globals was acceptable coding practice (and having register_globals=on the default). While all new code that goes into Geeklog is written to work with register_globals disabled, a lot of that old code will still not work. There is a lot of it. As we make changes (bug fixes and enhancements) to the code we try to remove the dependency on register_globals. However there is still a lot of places where Geeklog uses register_globals.
-Vinny
6
8
Quote
Status: offline
Robin
Forum User
Full Member
Registered: 02/15/02
Posts: 725
Thank you vinny for your answer
The thing is that I had to move one of my sites to a new location and didn't check that they had register_globals turned off (BTW it is on now).
Really looking forward to a new version which will be register_globals independent.
Thanks
Robert
Geeklog Polish Support Team
The thing is that I had to move one of my sites to a new location and didn't check that they had register_globals turned off (BTW it is on now).
Really looking forward to a new version which will be register_globals independent.
Thanks
Robert
Geeklog Polish Support Team
8
6
Quote
Nbadinova
Anonymous
My provider has globals turned off as well and the .htaccess method of turning them on seems to be blocked. I did find the following code on php.net which I copied into lib_custom and everything seems to work now:
// Emulate register_globals on
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
}
// Emulate register_globals on
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
}
5
6
Quote
All times are EST. The time is now 09:40 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content