[eluser]kRON[/eluser]
The quickest solution would be to do a full scope search and prefix all phpBB variables with 'phpBB_'. Search for words beginning with '$', [', [", ->. I haven't had a look at phpBB, but if you can crack down public variables and globals - all the better.
Additionally, you could also implement namespaces (cleanest solution) but that'd likely take too much time.