FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP Security





imagefree
http://www.thesitewizard.com/archive/phpsecurity.shtml wrote:
How PHP 4.1.0 will Change Your Scripts

In theory, PHP 4.1.0 should not require you to modify your existing scripts, or, at least not in its default settings.

However, if you plan to have your scripts survive in later semi-major versions of PHP (eg 4.2.X, 4.3.X, 5.0.X, etc), you will need to migrate your scripts to use the $_GET, $_POST, $_COOKIE, etc, arrays. As noted earlier, later semi-major versions (and of course major versions) will likely not automatically register form variables as global variables in its default settings. So if you are writing a script, and your web host is already using version 4.1.0 (or above) of PHP, you might want to consider changing your coding methods so that you will have less headaches when a new version of PHP is released. Of course, a consequence of such a change is that your script would not be backward-compatible with PHP 4.0 and earlier.


What does the emphasized text mean? Doesnt it mean that i later php versions, $_POST/GET/COOKIE/REQUEST variables will get deprecated?

Read full article to get more info.

Thanks
kv
No, it does not. It just means that you WILL have to use $_GET or $_POST variables to get the get/post variables. In the older versions, these variables were registered automatically and were available as normal php variables in the script.

Eg:

Assume a textbox with name text1 and value val1

Old way or referring to the variable:

$textval=$text1;

New way or referring to the variable:

$textval=$_POST['text1'];
imagefree
but i think old way was http_post_var Confused
kv
imagefree wrote:
but i think old way was http_post_var Confused


Yes, but also auto_register on by default, which means that by default, you need not use http_post_var and can use $<field name> (eg: $id ). Now it is off by default.
Related topics
How To : Secure Your PHP Website
php security problem
[PHP/security] sending content over SSL
how did you learn about html, php or other languages???
O'calhoun's reusable stupid php question thread [NEW]
Calculating Complimentary Colours Problem
March to be the Month of PHP Bugs
What happened to Perl?
Website login?
PHP Security problems with latest frihost changes
Maximum File Size
Deleting a "test databse"
Problems with Posting
Which one is better email pattern
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.