i added this code at line 2:
$GLOBALS['galabsLink'] = str_replace("/WA_Globals", "/powergallery", $GLOBALS['absLink']);
the code may be different if the power gallery files are installed to a different folder.
i then changed both instances of:
$GLOBALS['absLink']
in that file to:
$GLOBALS['galabsLink']
it is a conflict caused by both power gallery and Power CMS using the same variable to set the root, but power gallery needs to point to a different folder.