I've also run into problems getting Gallery to work when setting it up on a web site. Each time I ran into problems, it was because of something I'd typed wrong, or some small misconfiguration of the server, so none of it is Gallery's fault. But still, one slip and it gives you trouble. So I know where you're coming from.
As an alternative to a server-side gallery program, may I suggest
Web Album Generator.
When a friend asked me to help them set up Gallery, I realized that I wouldn't recommend it to anyone else unless they were a guru who ran their own Linux server. Doing the album client-side and uploading it to the server is almost always less trouble for most people, and that's what Web Album Generator does.
There are lots of client-side album generators, but that one is my favorite. I seem to recall asking around on this BBS for a client-side album generator, tried a few, and eventually settled on that one for my friend.