I re-installed zenphoto again. However, still no luck. Here were the steps I used:
1. I unloaded the tar ball to my server's web root.
2. untarted it with command: sudo tar -xvvzf zenphoto_1.2.5.tar.gz
3. Copied zp-config.php.source to zp-config.php and added database name, user name and password.
4. Ran the setup file. It complained that \cache and \album directories were not accessable.
5. sudo chmod 777 cache and sudo chmod 777 album
6. I could upload pictures after that. All was fine. However, when I clicked the gallary, it broke again. I did not modify the .htaccess file. Its file version is 1.2.2.0 as bundled with the tar ball. I did not modify the setup.php either. Setup.php defines ('HTACCESS_VERSION', '1.2.2.0') which is the correct .htaccess verion I had. It should work. However, it did not.
Did I make any mistake in the way? How can I get my zenphoto to work?