The easiest is to create a php.ini file inside the folder where you want to set the flags in and voila.
For example, to set register_globals off, create a php.ini with the following
register_globals = OffUpload this file to that folder and try now phpinfo() to see the local settings for register_globals. Yes it is off.
This setting in important to get rid of the warning you got from Joomla or Moodle.
PHP is really an amazing language.