473,800 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not possible to turn register_global s on

258 Contributor
Hi everyone
I'v been working on my scripts more that 5 months using Microfoft IIS on windows XP. As default the ( register_global s ) was ON ( php.ini ) and that means I didnt need to use ( $_request ) to get the variables from URL.
I bought a webspace for 2 weeks ago and realized that ( register_global s ) is turned off on the server. I contacted the support center but they said its not possible for them to turn it on ( because of some security reasons )
Does anyone know how to get all variables from the url at the same time?
It's realy hard for me to change all scripts and get the variables one by one.

Thanks
B...
Sep 6 '07 #1
4 1541
Atli
5,058 Recognized Expert Expert
Hi, and welcome to TSDN!

It is often possible to create your own php.ini file and place it in your web root. You should ask your host if this is a possibility.

I would however recommend, if at all possible, to rewrite those portions of your code that require the register_global s variable to be enabled, as it is a security risk, and it is rarely enabled on live servers.

If, however, you are willing to risk it, check out the extract() function. Note that this function is just as much as a security risk as the register_global s variable, if used on data that has not been validated.
Sep 6 '07 #2
bnashenas1984
258 Contributor
Actualy my server does not let me have my own php.ini
but i used extract() instead

Thank you so much
Sep 17 '07 #3
aktar
105 New Member
Have you tried the ini_set function?
Sep 17 '07 #4
bnashenas1984
258 Contributor
yes but it doesnt work.. because when ini_set changes the configuration variables are already sent..

But I fixed the problem with extract()

extract($_REQUE ST, EXTR_PREFIX_SAM E, "wddx");
Sep 17 '07 #5

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

Similar topics

4
12463
by: Frank | last post by:
Whats best : register_globals ON ? OR register_globals OFF ? I currently use: $_POST
3
2091
by: Useko Netsumi | last post by:
in php.ini? Thank
6
2521
by: wonder | last post by:
Hi, The CRM application said that need to add an option "REGISTER_GLOBALS=On" to the php.ini file, so I did what it told. But I still can't get rid off the following error: The PHP variable "REGISTER_GLOBALS" is disabled (0). This is fatal. Edit your php.ini and set REGISTER_GLOBALS to "On". I changed the value "On" to "Yes", still getting the same error.
2
1978
by: Phil Latio | last post by:
I am newish to PHP and wish to create an authentication system where a new user is required to validate/complete their sign-up by clicking a link in an email. I am probably capable of putting something together where the user gets sent a link with a set of values but I am sure it would require "register_globals" set to ON. How is this achieved with "register_globals" set to OFF?
15
3400
by: news | last post by:
You'd think it'd be easier to find the answer to this question. Did a search, and all I can find is people asking why something's not working and people replying it's because register_globals is off. I found one person said: "The change is for the better since register_global turned to on had some grim security implications." but no mentioning of what those are! I'm working on a server now, with a couple hundred PHP pages someone has...
12
3300
by: aeldaly | last post by:
Hello all, My shared server provider has register_globals on. I checked by running php_info(); from within a file. I would like to turn this off, but asking them to turn it off just for me will not work. I tried adding the following lines to the .htaccess file: <IfModule mod_php4.c> php_flag register_globals off </IfModule>
17
2925
by: peter | last post by:
I just took over the website at work. I am still learning PHP. Register_globals are on and the script appears to be coded to take advantage of this. I know how to recode the script, but am unsure how to turn them off when I am done. I have googled and came up with placing php_flag register_globals off in the .htaccess file.
5
4734
by: Samuel Shulman | last post by:
I keep getting the 'FATAL ERROR: register_globals is disabled in php.ini, please enable it!' error I changes that settings and I still get this error What should I do next? Thank you, Samuel
8
1796
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 secure. Surely Mr Malicious Coder can still just send his own version of $_POST? Obviously I'm missing something, I just can't figure out what! +mrcakey
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10504
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10274
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.