PHP Register

Is there a way to turn the PHP Register 'Off' in my code without having to do this in the php.ini file ? I need to turn it off to install a program then turn it bac on when I'm finished.
Thanks,
mhoggatt1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

alain34Commented:
make sure to read the following

http://uk2.php.net/manual/en/ini.core.php#ini.register-globals

taken from the url above:

register_globals boolean
Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables.

As of PHP 4.2.0, this directive defaults to off.

Please read the security chapter on Using register_globals for related information.

Please note that register_globals cannot be set at runtime (ini_set()). Although, you can use .htaccess if your host allows it as described above. An example .htaccess entry: php_flag register_globals off.

Note: register_globals is affected by the variables_order directive.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WoodyRoundUpCommented:
What do you mean by PHP Register?
If you are installing a program in linux, you will need to recompile it.
But If you are doing it from Windows, you don't need to do anything.
Is that your question?

If what you are talking about was regarding the variables registers, then nothing should be effected when you install a new program.

That's from my point of view.
joshlrogersCommented:
Some programs will not install(assuming your trying to install a PHP program) when register globals is turned on due to security reasons, it is very dangerous to have register globals turned on due to sql injection attacks, etc....

You can do what your trying to use by using ini_set('register_globals', 'off'); and you'd probably have to do this in multiple scripts of the installing program.  Then if you were turn it back on 1 of two things would happen, you'd break it and it wouldn't work anyways, or 2 you'd open yourself up to tons of security holes.  Anyways....

Good Luck!
Josh Rogers

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.