HTTP_xxx_VARS is deprecated

Moderators: Moderator Team, Development Team

HTTP_xxx_VARS is deprecated

Postby BHiker on Sun Jan 04, 2004 12:24 pm

HTTP_xxx_VARS is deprecated and replaced by superglobals _xxx (http://be.php.net/manual/en/language.va ... efined.php).

HTTP_xxx_VARS is used in login.php where HTTP_POST_VARS can safely be replaced by _POST.

// edit: found a few more:
In include\head.inc.php
Code: Select all
<meta name="Server Software" content="<?php echo @$HTTP_SERVER_VARS["SERVER_SOFTWARE"]; ?>" />
// should be:
<meta name="Server Software" content="<?php echo @$_SERVER["SERVER_SOFTWARE"]; ?>" />

similar in libraries\defines.lib.php
and libraries\grab_globals.lib.php

BHiker
BHiker
 
Posts: 13
Joined: Sat Jan 03, 2004 3:52 pm
Location: Belgium

Postby V@no on Sun Jan 04, 2004 6:34 pm

but for best compatibles the $HTTP_xxx_VARS should be "merged" with $_xxx
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby sdjl on Sun Jan 04, 2004 8:51 pm

I think the reason $HTTP_XXX_VARS are used is because of people using lower versions of PHP where the newer version of super globals will not be recognised.

If you look at the Version 3 development page (http://www.phpee.com/pphlogger3-dev/) You will notice that the only versions of PHP that will be supported are 4.3.0 and greater.
I think we can safely say that the newer super globals will be used instead of the old style :)

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

PPhlogger3 & PHP5

Postby pipo on Tue Feb 17, 2004 10:46 pm

Right, $HTTP_XXX_VARS are deprecated. PPhlogger 2.x actually should still run under PHP3 (AFAIK >= 3.0.9). There won't be any major changes in its code design as I took up development on PPhlogger3 again. As announced on http://www.phpee.com/pphlogger3-dev/, PPhlogger3 will only support PHP >= 4.3.0. Wrong, even here I have to correct myself: PPhlogger3 will ONLY support PHP 5! Currently PHP 5.0.0b4 is out and the final release is expected this summer. At this time I'm not going to explain why I made this decision. It's still not 100% sure, but there is a high chance that I'll drop all PHP4 support in this future version.
This is the first public announcement about this fact. I'm going to post about that in the announcement board as soon as I got more details.
Philip Iezzi - Development Team Leader, phpee.com
PHPee.com | Downloads | PPhlogger
hosted by Onlime Webhosting
User avatar
pipo
Site Admin
 
Posts: 773
Joined: Sat Nov 15, 2003 2:57 pm
Location: Zurich, Switzerland


Return to Phlogger3 feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron