The use of "por" and "para" with durations has very different meanings.
"Por+duration" indicates the duration of an action or status. Some speakers (including me) prefer the use of durante for this purpose, but por is also correct and has been used since the Middle Ages, according to Fundéu. For example:
No podrá jugar [por/durante] mucho tiempo (He won't be able to play for a long time)
El Zaragoza ha tenido una buena cantera [por/durante] mucho tiempo. (The Zaragoza team has had a good reserve of young players for a long time)
"Para+duration" is used specifically to mean that a resource or a supply will last for the specified amount of time:
Los excursionistas se llevaron comida para tres días (The hikers took with them food for three days)
El Zaragoza tiene cantera para mucho tiempo (Zaragoza's youth team will provide players for a long time)
Although I have used "mucho tiempo" in most of the examples, this works for any duration expression, such as "cinco años".