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:
in that file to:
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.