Click to See Complete Forum and Search --> : Undefined variables


Anon
07-31-2002, 10:35 AM
hello again

i have a problem after installation of php 4.2.1 on apache 1.2 on a win2000 system (local).

quite everything works, BUT!

certain vars are not recognized anymore...

"Undefined variable..."

in general this "undefined variables" are those which i pass in the urls.

the same php-file on the webserver works without problems...strange :-/

i do a workaround declaring all those vars explicitly in the target php-file. but i dont want to change the whole code just for this reason.

any ideas are very appreciated...

tia
sandro

blr32
08-10-2002, 04:59 AM
I think the problem is the register_globals setting in the php.ini which from version 4.2.0 has been set to OFF
( http://www.php.net/ChangeLog-4.php )

that means that all variables must be referenced through $_POST['variable_name'] or $_GET['variable_name'] depending on which posting you are using.

( http://www.php.net/manual/en/configuration.php#ini.register-globals )

( http://www.php.net/manual/en/security.registerglobals.php )

Otherwise your Error reporting may be set too low (also including notices)

hope it helped

Sandro wrote:
-------------------------------
hello again

i have a problem after installation of php 4.2.1 on apache 1.2 on a win2000 system (local).

quite everything works, BUT!

certain vars are not recognized anymore...

"Undefined variable..."

in general this "undefined variables" are those which i pass in the urls.

the same php-file on the webserver works without problems...strange :-/

i do a workaround declaring all those vars explicitly in the target php-file. but i dont want to change the whole code just for this reason.

any ideas are very appreciated...

tia
sandro