Solved

How to set php_flag  in .htaccess files

Posted on 2008-10-21
7
289 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
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Healthcheck 2 81
php date - compare 4 40
ajax call to redirect to a different page with data from controller 7 44
datetime in sql 6 22
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

930 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

13 Experts available now in Live!

Get 1:1 Help Now