Gallery directory is where photopost is installed?
You can try inserting near the top of the script this
Code:
Content visible to verified customers only.
Ugh that one error is pretty generic as well. I can only summarize your script is possibly timing out. How many images?
[/code]