This question depends entirely on how you want to market your photo contest.
The average photo contest runs anywhere from 3-6 weeks, although we have had photo contest that have been for a much shorter period and photo contests that have been for a much longer period.
Thoughts on each below:
Shorter photo contest (2-3 weeks):
If you want to run a short photo contest, be prepared to market the photo contest fast and furiously to make sure that all who want to participate have a chance to do so. Shorter contest periods work well if you're offering a smaller or lesser value prize package.
Longer photo contest (8+ weeks):
Any photo contest running longer than 8 weeks is going to need the help of dedicated marketing in order to keep your audience interested. A longer photo contest works well if you have specific events where you can market the photo contest in order to keep interest piqued (for example, marketing it at a walkathon, or a wine dinner).