Topic: BuildGallery.php error

I'm trying to use  buildgallery.php and get the following error
Class 'DOMDocument' not found in /path/to/my/domain/sv/buildgallery.php  on line 939

I ran svmtest because I assumed it would have similar or more requirements than buildgallery.php and I passed all the tests.
I'm using PHP 5.2.6

Thank you.