At 11:35 PM 5/30/2002 +0930, Michael Hall wrote:

When I asked I got this response.

$types_to_register = array('GET','POST','COOKIE','SESSION','SERVER');
   foreach ($types_to_register as $type) {
     $arr = @${'HTTP_' . $type . '_VARS'};
     if (@count($arr) > 0) {
       extract($arr, EXTR_OVERWRITE);

put that at the of of your scripts and everything will work ok untill you 
get things moved over.


>I've been using PHP 4.0.1 for ages now, and have decided to upgrade one of
>my machines to 4.2.1 and get used to working under the new security
>I understand that older scripts are fully compatible with 4.1.0+, or can
>be made
>so with minimal fuss. I am assuming that scripts written using the new
>$_GET and $_POST (etc) arrays simply won't run under pre-4.1.0 versions of
>So, where does this leave us with regard to ISPs that still run older
>versions of PHP (so that users' scripts won't break)? Is there some way to
>write code using the new arrays, but that will run under older versions of
>PHP. Would including something like this at the top of a script work:
>while inside the code reference is made only to $_POST ?
>Sorry if this has been covered repeatedly, I've only just rejoined the
>list after a break from the relentless volume (of great, useful info).
>Michael Hall     [EMAIL PROTECTED]
>PHP General Mailing List (
>To unsubscribe, visit:

Kurth Bemis - Network/Systems Administrator, Computer

"Jedi business, Go back to your drinks" - Anakin Skywalker, AOTC

PGP key available -

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to