How to set php_flag in .htaccess files

I want to set some php_flag in the .htaccess file sofar i have had no luck.
the site is running on a virtual box and i do not have access to the php.ini nor do i have shell access.
however the site needs to have register_globals switched off i also want to turn magi quotes off cause its messing up the output.

could someone post me a .htaccess file with those flags in it turned off so i can see if it will wiork on my site ?

mdeekAsked:
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.

Beverley PortlockCommented:
Just add the following line to .htaccess

php_flag register_globals 0

make sure .htaccess has a "." in front of it and that your ISP allows you to st values in .htaccess

0
Beverley PortlockCommented:
Hmmm typo time... The sentence in the previous post should end with "...allows you to set values in .htaccess"
0
Beverley PortlockCommented:
Not my day for reading things..... I've just noticed you wanted magic quotes off as well

php_flag magic_quotes_gpc off

Open in new window

php_flag register_globals off

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Beverley PortlockCommented:

D*mn! It is going wrong today...... :-O Ignore the <code> stuff

php_flag magic_quotes_gpc off
php_flag register_globals off
0
mdeekAuthor Commented:
do i have to restart the webserver in order for that to take effect ?? cause i cant do that dont have access for that .
0
mdeekAuthor Commented:
i just tried that and it gives me a server error of 500 :(
0
mdeekAuthor Commented:
found solution thanks :)
0

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
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.