Answers
Feb 19, 2007 - 03:59 AM
$http_get_vars should still be available though - but maybe there is a setting in php.ini that configures how this variable can be accessed. Anyway, just use $_GET from now on - it's the official way ;-)
Feb 19, 2007 - 04:02 AM
I'll use $_GET from now on.
I found out that the change was the new host not having Register Globals enabled default.
Jun 05, 2007 - 07:24 PM
register_long_arrays = On
Or
********************
insert into your .htaccess file
register_long_arrays = On
*****************
and Enjoy with your nice codding
Jan 05, 2009 - 11:45 PM
$_GET officially replaces $http_get_vars.
$http_get_vars is still available if the directive "register_long_arrays" is enabled.
Read more:
http://www.php.net/manual/en/reserved...
http://www.php.net/manual/en/ini.core...
If you are used to having the url query string parameters automatically accessible as variables in your script it is because the PHP directive "register_globals" is enabled. Another host might have this directive disabled (strongly recommended to avoid exploitations) and therefore any script that relies on "register_globals" will fail.
Read more here:
http://www.php.net/register_globals
Best regards,
Jakob
Mar 02, 2009 - 01:53 AM
Since you are using a host I guess you don't have the option ot switch these deprectated (obsolete) commands on for your server so you'll need to change your scripts.
I've just done this using search and replace in a text editor, replacing all instances of $HTTP_GET_VARS with $_GET and $HTTP_SERVER with $_SERVER. working a treat now.
Best of luck.
Andy
Jun 25, 2013 - 05:36 PM
Very angry comment I just added on the PHP manual.
http://php.net/manual/en/ini.core.php
My webpage just failed and it looks like you changed php to stop my webpage working.
There's no worse crime in computer science than failing to respect backwards compatibility.
This xxxx , big time.
It looks like you've trashed $HTTP_GET_VARS.
It seems to be traced backed to
register_long_arrays "1" PHP_INI_PERDIR Available since PHP 5.0.0. Deprecated in PHP 5.3.0. Removed in PHP 5.4.0.
Register Globals
Warning
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
So now, the whole PHP community has to go back and re-code all our PHP programs?
xxxx you all for your high and mighty "Let's give the users a kick up the ass, because they've nothing better to do".
If I could kill someone for this, I would.
Add New Comment