Solved

How to set php_flag  in .htaccess files

Posted on 2008-10-21
7
294 Views
Last Modified: 2012-05-05
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 ?

0
Comment
Question by:mdeek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 22767513
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
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 22767536
Hmmm typo time... The sentence in the previous post should end with "...allows you to set values in .htaccess"
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 22767619
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 22767637

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

php_flag magic_quotes_gpc off
php_flag register_globals off
0
 

Author Comment

by:mdeek
ID: 22767924
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
 

Author Comment

by:mdeek
ID: 22767991
i just tried that and it gives me a server error of 500 :(
0
 

Accepted Solution

by:
mdeek earned 0 total points
ID: 22768130
found solution thanks :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
What You Need to Know when Searching for a Webhost Provider
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question