I'm running PHP5.1.6 and MySQL 5.0.22 on my live server, and the UBB runs without issue. I also run similar versions on my dev server (PHP 5.0.4 MySQL 5.0.22; guess i should upgrade php huh lol).
If you are restoring a backup, you shouldn't run install.php, or upgrade.php for that matter; simply move files over, chmod them, then upload your database, then update paths...
If you're restoring an install you don't run install.php or upgrade.php, these are only for new installs. If it's a current install you should jut have to update paths in the configuration files.
You could also try hiring a developer (ie one of the moderators here or at ubbdev) to do a migration.