Solved

How to set php_flag  in .htaccess files

Posted on 2008-10-21
7
292 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 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