Results 1 to 4 of 4
  1. #1

    PHP echo problem

    We have a customer on FreeBSD and 4.2.1 PHP installed

    Would anyone have any idea what is wrong with this

    the problem is echo() doesnt work (IM NOT A PHP GUY) go off these two urls and u can see the 2nd one, doesnt post the info

    whats in each file
    PHP Code:
    echo $var;
    One thing i noticed is that my php file has alot more in terms of PHP Variables specially where it starts _ENV["XXXXX"]

    his doesnt but have 2 lines of the ENV stuff

  2. #2
    Join Date
    Nov 2000
    Vancouver, BC
    php 4.2 + forces the $_GET and $_POST super global variables.

    so while in pre 4.2, you can do this:


    and get it like so:

    echo $var;

    in 4.2+, you would have to:

    echo $_GET[var]

    i think that's what you're talking about?

  3. #3
    Join Date
    Mar 2001
    You can also edit your php.ini file and set

    register_globals = On

    to get PHP < 4.2.x behavior, but it is not recommended according to the notes inside the php.ini file.

  4. #4
    RutRow is correct, if the register global variable is set to off, you can't use the shortened variable names. You'll notice that if global variables is off HTTP_COOKIE_VARS/POST_VARS/GET_VARS/SERVER_VARS/ENV_VARS ect... will only work, while $var (a variable your client is creating at run time and filling with GET data, will not.

    Simply turn on the register globals variable in php.ini to fix your problem.
    :// Matt (

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts