PHP files are not working! (Magic Quotes)
Posted by - NA -, Last modified by Jen Ferraz on 01 April 2011 11:19 AM
Magic Quotes GPC and Runtime are not enabled on a server-wide basis on hosting accounts because it can break applications that don't expect it to be on and that don't test for it being on.|
You can turn magic quotes runtime on for your site on an entire site, entire directory or even just a single script basis.
Magic quotes GPC can be turned on for a directory or the entire site.
To turn magic quotes runtime on on just a per-script basis, you will want to use the set_magic_quotes_runtime() function documented here:
To turn it on on a per-site or per-directory basis, the steps are the same for both types as well as for magic quotes runtime and gpc:
1) Create a text file with the following contents:
php_flag magic_quotes_gpc on
php_flag magic_quotes_runtime on
2) Name the file whatever you would like and place it in the directory you would like magic quotes turned on for. Once it is there, rename the file to .htaccess (note the leading period). That will enable magic quotes for the directory and all below it.
So if you would like to turn on magic quotes for the entire website, place the file in the httpdocs/ directory for your site and that will cause it to apply to everything on the entire site.