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

Home Posts Topics Members FAQ

Register_Global s on on some website

Is it possible to set Register Globals on or off depending on the virtual
directory of apache in which PHP is running? Is it possible using only one
php.ini?

Thanks,
A
Jul 17 '05 #1
3 1697
Andrea A wrote:
Is it possible to set Register Globals on or off depending on the virtual
directory of apache in which PHP is running? Is it possible using only one
php.ini?


Here's from my .htaccess for one of my sites:

php_flag register_global s 0

Changing it to 1 will turn it on.

You should also be able to do this inside the VirtualHost directive.

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Jul 17 '05 #2
Justin Koivisto wrote:
Andrea A wrote:
Is it possible to set Register Globals on or off depending on the virtual
directory of apache in which PHP is running? Is it possible using only
one
php.ini?>


Here's from my .htaccess for one of my sites:

php_flag register_global s 0

Changing it to 1 will turn it on.

You should also be able to do this inside the VirtualHost directive.


This is interesting, I did not know you could do this, but I don't
really understand anything about virtual directory/virtual host. I'll do
a search and see if I can find something about this, but I wonder if
anyone would care to recommend some good on-line documentation?

Jul 17 '05 #3
bonehead wrote:
Justin Koivisto wrote:
Andrea A wrote:
Is it possible to set Register Globals on or off depending on the
virtual
directory of apache in which PHP is running? Is it possible using
only one
php.ini?>

Here's from my .htaccess for one of my sites:

php_flag register_global s 0

Changing it to 1 will turn it on.

You should also be able to do this inside the VirtualHost directive.


This is interesting, I did not know you could do this, but I don't
really understand anything about virtual directory/virtual host. I'll do
a search and see if I can find something about this, but I wonder if
anyone would care to recommend some good on-line documentation?


http://httpd.apache.org/docs/ :-D That's where I get it all...

Also, the PHP stuff:

what can be set where:
http://us2.php.net/ini_set

and for apache *module* settings:
http://us2.php.net/manual/en/configuration.changes.php

Looks like these *won't* work for CGI mode.

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2228
by: toufik toufik | last post by:
Hi, In the setting of my host, the variable register_globals is set to On, I like to set it to Off in my solution, is it possible? I've tried in my code: ini_set("register_globals","0"); but it doesn't work... Thanks for your help.
10
2208
by: John | last post by:
Hello. I am a newbie to PHP. I am over halfway through my first book that I'm learning with and have just created login pages etc. I just wondered, if I am running php/mysql/apache locally, should I be okay to turn register_globals on without any security issues? Thanks
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.
8
2657
by: lian | last post by:
Hi all, I have installed a web-based software written in php which needs that i should turn "register_globals" from off to on in the php.ini. There are some comments for register_globals in php.ini saying: "You should do your best to write your scripts so that they do not require register_globals to be on; Using form variables as globals can easily lead to possible security problems, if the code is not very well thought of."
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...
6
1805
by: peter | last post by:
Hi. I am just learning PHP. I'm taking over the website at work, which is coded in PHP. I am wondering about register_globals. They are on on the server we use. Is that a threat? I understand I may have to recode if I turn them off, but is there a simple way to turn them off and see if the code still works? Thanks, Peter
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
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...
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
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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();...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.