Topic awaiting preservation: PHP_Self is undefined variable?? (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Australia |
posted 05-13-2003 01:57
Hi all, my webhost recently upgraded from php 4.1 to 4.3, before this all my scripts were working perfectly. Now i am having problems with some undefined variables! in particular $PHP_Self which is supposed to return the current php file name. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 05-13-2003 02:00
H][RO: They changed a few things around (not very helpful I agree) so try: |
Bipolar (III) Inmate From: Australia |
posted 05-13-2003 02:12
Thanks Emp, appreciate it. Also it wont pull the variables from the url, like Myfile.php?thisVariable=5 |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 05-13-2003 02:16
They've been trying to phase out the conversion of GET variables for a while for security purposes. |
Bipolar (III) Inmate From: Australia |
posted 05-13-2003 02:20
=( Thanks guys, is there anything i have to do to make these available? Whenever i do any of the above all i get is "Undefined Index".. Its gonna be one of those days =(... |
Bipolar (III) Inmate From: Australia |
posted 05-13-2003 02:24
I just noticed my PHP_Info file of my webhost has register_globals set to off, could this be the reason why these arent working? |
Bipolar (III) Inmate From: Australia |
posted 05-13-2003 02:57
Ok that wasnt the problem as i read on =/, i figured it out thanks for your help all, much appreciated. I was getting an error but it was still working, because the variable didnt exist the first time the php ran. Silly error on my part hehe. |
Maniac (V) Mad Scientist From: :morF |
posted 05-14-2003 14:43
As far as I know though such variables are case-sensitive...so PHP_Self won't work where as PHP_SELF will...as well, it is an auto-global, so register_globals doesn't need ot be on...if you do turn it on, that means you have to difne all your normal auto_globals at the start of each script. |