This can be done with the use of .htaccess and a custom php.ini file.
First, create or modify the .htaccess file in the root of your site, and paste in the following line:
Quote:
|
SetEnv PHPRC /path/to/site/my_custom_php.ini
|
Once thats done, you can then go on to create your custom php.ini file. To achieve what you want to, you will need to paste the following into it:
Quote:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
|
Thats all that done. To check that you are using the new custom php.ini file, create a PHP page containing the following text:
PHP Code:
<?php phpinfo(); ?>
Your custom php.ini file will affect your web site hosting only, and not the sites of other customers. It can also be done per directory, if needed.