In order for these settings to work in your htaccess file, you will need to add "Options" to your AllowOverride specifications for the directory/webserver if it's not already allowed.
You can use the ini_set() function to set a directive's value in your scripts provided the "CHANGEABLE" attribute in the above chart is PHP_INI_USER or PHP_INI_ALL.
add settings to a .htaccess file with 'php_flag' like this:
php_flag register_globals off
php_flag magic_quotes_gpc on