Displaying the errors from my BuddyPress script

thanks for sharing your script with us. It’s totally normal that this script results in a blank screen because it does not do any output.

So once you have requested it, it should have created the groups.

UPDATE:

If it did not create the groups, then the script failed. It’s highly likely you’ve made an error. Ensure that you can see all errors, so check the error log or enable error displaying and reporting for that file. This is some runtime configuration for a starter:

ini_set('display_errors', true);
error_reporting(E_ALL);