Btw, the reason you got all the output is why I said to hit the browser Stop
button. Technically it will run forever.

The GLOBALS array contains an a array called GLOBALS, which contains
GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2.

get_defined_vars isn't available till 4.0.4, so that's why you got the
error.


But from looking at your output, there is definately something screwy with
their setup.

In phpinfo, what are the settings for track_vars (if listed) and
global_vars?


"Franklin Hays" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hello.
>
> The version is php-4.02 built on Sep 22, 2000.
>
> |What version of PHP? I ask because a few test functions aren't available
on
> |older versions of PHP4.
> |
> |Try this piece of code:
> |
> |$arr = get_defined_vars();
> |
> |print_r($arr);
>
> This gave me an error on get_defined_var() so I tried
> print_r($GLOBALS) and got a ton of output of the form:
>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => | /test.php ) [GLOBALS] =>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|(if that
> doesn't work, try print_r($GLOBALS), but be sure to hit the Stop
> [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS]|button on your browser, because it will print off an
> infinite list) | => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array (
> [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] =>
> Array ( )|Now, look at the results. In the main listing, does it list any
> of the ENV [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS]|variables you are trying to access? | => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )|If not, page down a
> bit and look in the HTTP_SERVER_VARS array. Are the ENV [HTTP_COOKIE_VARS]
> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|variables in
> there? | => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS]
> => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF] =>
> /test.php|My guess is that they probably are. Check phpinfo() again and
> see what |register_globals is On. That may be your problem...
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF]| => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array (|If none of the variables you seek are in
> HTTP_SERVER_VARS, then something is [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS]|wrong
> with the installation of PHP itself. | | => Array ( [PHP_SELF] =>
> /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )| |-- [GLOBALS] =>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> =>|Plutarck |Should be working on something... /test.php ) [GLOBALS] =>
> Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (|...but
> forgot what it was. | [PHP_SELF] => /test.php ) [GLOBALS] => Array (
> [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] =>
> Array ( ) [HTTP_SERVER_VARS]| | => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( )
> [HTTP_COOKIE_VARS]|> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF]
> => /test.php ) [GLOBALS] => Array ( [PHP_SELF] => /test.php
> [HTTP_GET_VARS] => Array ( )|> I am migrating a site to a new host
> (westhost.com) and having some [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> ( [PHP_SELF] => /test.php [HTTP_GET_VARS]|> issues.  PHP was compiled as a
> cgi instead of a module which is what I => Array ( ) [HTTP_COOKIE_VARS] =>
> Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php )
> [GLOBALS] => Array ( [PHP_SELF] => /test.php|> have always used.  This
> wasn't really an issue until I realized a lot of [HTTP_GET_VARS] => Array
> ( ) [HTTP_COOKIE_VARS] => Array ( ) [HTTP_SERVER_VARS] => Array (
> [PHP_SELF] => /test.php ) [GLOBALS] => Array ( [PHP_SELF]|> my scripts
> that depended on apaches environment variables ($REQUEST_URI, => /test.php
> [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS] => Array ( )
> [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php ) [GLOBALS] => Array
> (|> $HTTP_USER_AGENT, etc.) weren't working.  I can write a PERL cgi
> script
> [PHP_SELF] => /test.php [HTTP_GET_VARS] => Array ( ) [HTTP_COOKIE_VARS]
> => Array ( ) [HTTP_SERVER_VARS] => Array ( [PHP_SELF] => /test.php
> ) [GLOBALS]
>
>
> Something may be amiss with my hosts setup yet I have no idea what that
> may be.  Any suggestions?  I have never configured PHP to run as a cgi and
> have never had trouble getting global server variables.  Combine those two
> and I have no idea how to track this problem down.
>
> Many thanks for any/all help.
>
> //frank
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to