The PowerCMS generates the wrong code if all the CMS files and folders are not in the root folder for some (daft) reason.
So for instance, if all your PowerCMS files and folders are in a folder called (say) 'CMS100', then the two lines of code you put at the top of your page should be:
<?php include "CMS100/Connections/localhost.php"; ?>
<?php include "CMS100/WA_CMS/WA_CMS.php"; ?>
You will have to do that for each page you are puting CMS content in.
There is a way to solve this problem a little more elegantly in Step 3 of this pdf of the steps I did to do mine.