Line 214-221 those two queries in your phpbb2.php file replace with this.
Code:
Content visible to verified customers only.
Make sure to upload this changed file to your forums subdirectory under photopost and that should resolve your mysql error
As far as your first issue I suggest you set your cookies like this and this is the prefered way on any site.
cookie path /
cookie prefix phpbb2mysql
cookie domain .domain.com