473,382 Members | 1,786 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,382 software developers and data experts.

Register_Globals 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 1674
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_globals 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_globals 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_globals 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
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...
10
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,...
6
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...
8
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...
2
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...
15
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...
6
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...
17
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...
5
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,...
1
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.