Solved

How to set php_flag  in .htaccess files

Posted on 2008-10-21
7
288 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
  • 4
  • 3
7 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 34

Expert Comment

by:Beverley Portlock
Comment Utility

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
Comment Utility
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
Comment Utility
i just tried that and it gives me a server error of 500 :(
0
 

Accepted Solution

by:
mdeek earned 0 total points
Comment Utility
found solution thanks :)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now