Yes, this is very possible. Read the first paragraph on:
http://www.php.net/manual/configuration.php
for an explaination on how to accomplish this. Basically, if you want to enable magic_quotes_gpc in php3 you would do:
php3_magic_quotes_gpc on
or in php4 you would use the following:
php_flag magic_quotes_gpc on
Hope that helps!
Chris King