the cookie name for phpbb3 goes in the smkcookie field in the database. The cookie path should be /. The cookie domain should be .yoursite.com
The cookies should be all the same throughout the forum and gallery to stay and be logged in.
My suggestion if this is a new install is wipe out the pp_ tables from the database since you where hand editing fields and do a reinstall and install this time with all the correct information and you will be fine. The cookie name is asked for on step 4 of the install where we ask for all the other pertinent forum information.