473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Register Globals=Off Not Working

snowdonkey
Hey. I recently upgraded my Windows XP machine to PHP 5.2.0 and Apache to 2.2.3. I just realized that my scripts are able to use variables passed through via URL without using $_REQUEST[] to receive them.

I've made sure I have register_globals = Off in my php.ini file. Changing the error_reporting to E_STRICT didn't give me any feedback either. I also browsed the PHP 5 update logs but didn't see anything there.

Any ideas on how I can fix this? Anyone else experiencing the same thing? This could just be an update with the new PHP version but I doubt it . . .

Thanks!
Dec 23 '06 #1
4 2459
ronverdonk
4,258 Expert 4TB
Hey. I recently upgraded my Windows XP machine to PHP 5.2.0 and Apache to 2.2.3. I just realized that my scripts are able to use variables passed through via URL without using $_REQUEST[] to receive them.

I've made sure I have register_globals = Off in my php.ini file. Changing the error_reporting to E_STRICT didn't give me any feedback either. I also browsed the PHP 5 update logs but didn't see anything there.

Any ideas on how I can fix this? Anyone else experiencing the same thing? This could just be an update with the new PHP version but I doubt it . . .

Thanks!
If it works as you say, what is your problem? I only wonder how you get your variables passed in the url without using the $_GET array.

Ronald :cool:
Dec 23 '06 #2
I've always just used $_REQUEST array (which encompasses $_POST, $_GET, $_SESSION, and $_COOKIE) to get my variables passed through URL. If I have register_globals off than I should have had to use $_GET or $_REQUEST or else my script should've failed, but I alas, I fixed it.

Apparently the newest version of PHP turns display_errors=off as default, different than error_reporting. So even though technically there were errors, none were shown, and my script was allowed to work anyway. Thanks for the response ronverdonk.
Dec 23 '06 #3
Sorry, nevermind that business about $_REQUEST replaceable for $_GET, $_POST, etc. But I have always used it successfully for receiving variables through URL.
Dec 23 '06 #4
ronverdonk
4,258 Expert 4TB
Glad you found it. I always learn.

Ronald :cool:
Dec 24 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would...
7
by: Paul Liversidge | last post by:
I'd like your opinions as to why I don't use something like this... A function that iterates through $_GET, $_POST, $_COOKIES and $_SESSION arrays and turn them back into conventional variables....
1
by: Manu J | last post by:
Hi, i have a login script which makes use of sessions. Login script *********** session_start() ..... ..... ....
3
by: Jeremy Shovan | last post by:
Does any one know if there is a way to check if register globals is on or off in a program. Thanks, Jeremy
14
by: lkrubner | last post by:
If I set a variable at the top of my code like this: $name = "Lawrence"; It is now a global variable. If, later on, in a function, I want to do this: function uppercaseName() { global...
4
by: Angelos Devletoglou | last post by:
Hi... It drives me nuts this server. My php.ini says that register_globals is OFF and when I run phpinfo() it says they are ON. I restarted both httpd and the whole server still nothing. IS...
11
by: Sonnich | last post by:
Hi all! I was trying to understand this... http://www.php.net/manual/en/language.variables.external.php I wonder what teh community has to say about this... I need to get some vars...
8
by: +mrcakey | last post by:
I understand that register_globals was turned off by default as, unless you initialised it, it could be altered by a malicious coder. What I don't understand is how the $_POST form is any more...
1
George Lft
by: George Lft | last post by:
ok, first of all, i built my register page using dreamweaver tool which the codes haven been out of control. Now i'm thinking that turning over everything - by using this another set of codes. And...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.