Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 07:24 am EST
Geeklog Forums
Register Globals Question
RGQ
Anonymous
The Register Globals issue comes up a fair amount. I can do some basic to intermediate PHP coding and am wondering if I might help eliminate it.
What is required to recode Geeklog so that it runs with RG = off? If the holdup here is just a matter of going through the entire codebase and making a bunch of no-brainer changes, I am willing to do it and then organize a group of folks to test the changes.
Of course of the problem is very complex, then *ahem* nevermind.
What is required to recode Geeklog so that it runs with RG = off? If the holdup here is just a matter of going through the entire codebase and making a bunch of no-brainer changes, I am willing to do it and then organize a group of folks to test the changes.
Of course of the problem is very complex, then *ahem* nevermind.
9
12
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
The thing is, it's not even documented as no one could predict it would be a problem (at least not documented in the PHP files themselves).
What you need to do is go through every PHP file and change two things:
1) Every "used to be global" parameter into a super global one.
2) Every "old style" super global into a "new style" super global.
The downside is that it can wreck havoc for people with old versions of PHP...then again, there always comes a time when people who don't update are left behind.
Maybe we can turn this topic into a list of such parameters. If anyone who reads this can think of anything, simply list it here.
Oh, and mention whether it belongs to list number one or two.
Here, I'll start:
1)
$PHP_SELF
=>
$_SERVER['PHP_SELF']
2)
$HTTP_SERVER_VARS['PHP_SELF']
=>
$_SERVER['PHP_SELF']
P.S.
Download Auto Replace for a cool (installation free) freeware that can search and replace in multiple files in one click.
What you need to do is go through every PHP file and change two things:
1) Every "used to be global" parameter into a super global one.
2) Every "old style" super global into a "new style" super global.
The downside is that it can wreck havoc for people with old versions of PHP...then again, there always comes a time when people who don't update are left behind.
Maybe we can turn this topic into a list of such parameters. If anyone who reads this can think of anything, simply list it here.
Oh, and mention whether it belongs to list number one or two.
Here, I'll start:
Text Formatted Code
1)
$PHP_SELF
=>
$_SERVER['PHP_SELF']
2)
$HTTP_SERVER_VARS['PHP_SELF']
=>
$_SERVER['PHP_SELF']
P.S.
Download Auto Replace for a cool (installation free) freeware that can search and replace in multiple files in one click.
9
10
Quote
Status: offline
ronack
Forum User
Full Member
Registered: 05/27/03
Posts: 612
All times are EST. The time is now 07:24 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