making mods and security

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
phoenix-cms
Registered User
Posts: 34
Joined: Sat Mar 04, 2006 3:40 pm

making mods and security

Post by phoenix-cms »

hi i been looking into making mods and trying to keep to php5 and php6

after looking at php6 they seem to remove register globals will this stop $GLOBALS from working like $GLOBALS['pointsprefix']

thanks in advance

Steve
working on a cms to be intergrated with phpbb 3 without any major code changing to keep with phpbb 3 guidelines
User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: making mods and security

Post by Highway of Life »

Welcome to area51! (home of something strange ;) )

php6 is not released yet.

As of php 4.2, register_globals is off by default.

And yes, it will mean you won't be able to use the $GLOBALS[]
Image
APTX
Registered User
Posts: 680
Joined: Thu Apr 24, 2003 12:07 pm

Re: making mods and security

Post by APTX »

Don't you mean 5.2? Why won't you be able to use $GLOBALS?
Don't give me my freedom out of pity!
phoenix-cms
Registered User
Posts: 34
Joined: Sat Mar 04, 2006 3:40 pm

Re: making mods and security

Post by phoenix-cms »

what would you say best way around this, would you think i need to use ".$userprefix."".$pointsprefix."

i did try disable register globals in my local linux server
globals still seem to work is there alternative to this method

thanks in advance Steve
working on a cms to be intergrated with phpbb 3 without any major code changing to keep with phpbb 3 guidelines
code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

Re: making mods and security

Post by code reader »

ttbomk, register_globals has nothing to do with the $GLOBLAS superglobal.
what register_globals setting does, is automatically register the EGPCS (Environment, GET, POST, Cookie, Server) as globasl. this means that if someone loads a page with url_address?key=value, not only will you have $_GET['key'] == 'value', but also there will be a "magic" global variable, $key with the value of 'value'.
it is a general concensus that this was a bad idea in the first place, php turned register_global by default from on to off as of php 4.2.0, and it seems that register_global support is/will be dropped completely in the newer versions of php.
in any event, (again, ttbomk) this has nothing to do with the $GLOBALS superglobal which is, and will continue to be, available.

my 2c.
itunes66
Registered User
Posts: 169
Joined: Tue Feb 08, 2005 12:28 am

Re: making mods and security

Post by itunes66 »

APTX wrote: Don't you mean 5.2? Why won't you be able to use $GLOBALS?

like code reader said

No, 4.2 is Correct, it is Off by Default, Check the php.net documentation, And Yes You can use $GLOBALS

http://www.php.net/manual/en/security.globals.php" target="_blank
PHP: Using Register Globals - Manual wrote: Perhaps the most controversial change in PHP is when the default value for the PHP directive register_globals went from ON to OFF in PHP 4.2.0.
2 things i like about you hmm.. ill have to get back to you on that one
User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: making mods and security

Post by naderman »

And with the removal of register_globals in PHP6 only the register_globals mechanism described above will be removed. Of course global variables will still be possible ;-)
bart416
Registered User
Posts: 1
Joined: Fri Feb 11, 2005 10:34 pm

Re: making mods and security

Post by bart416 »

phpBB 2 doesn't work with php 6 dev.
Haven't tried 3 beta 1.
Going to test when i remember it.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 371
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: making mods and security

Post by Paul »

bart416 wrote: phpBB 2 doesn't work with php 6 dev.
Haven't tried 3 beta 1.
Going to test when i remember it.

phpbb3 works some months ago correct with php6 dev.
phoenix-cms
Registered User
Posts: 34
Joined: Sat Mar 04, 2006 3:40 pm

Re: making mods and security

Post by phoenix-cms »

thanks guys was getting kinda confused with php6 C code when i was looking though it

atlest that cleans it up for me was going to start again otherwise.

Steve
working on a cms to be intergrated with phpbb 3 without any major code changing to keep with phpbb 3 guidelines
Post Reply