If I place my example1.php file in the root of my cgi user space, it works fine. If I place it in a directory called gallery it also works fine. If I place it in a sub-directory called gallery/setup I get Internal Server Error. If fact any attempt to access any file (that exists or not) in gallery/setup gives the same error.
The permissions on all the .php files are 755, as are the permissions on the gallery and gallery/setup directories.