One tablespoon of bleach (or 100-150 ppm in commercial systems) per gallon of water will kill most molds, bacteria, and fungi. I have heard some say that for non-eating pumpkins a ratio of 10:1 water to bleach can be used, which is probably overkill. I do not recommend that much if you plan on eating the pumpkin.
When carving a Jack-O’-Lantern, the same 1 tablespoon per gallon of water, immersing the pumpkin fully, will kill off molds, fungi, and bacteria. Turn the pumpkin upside down (unless you cut the bottom instead of the stem as I do), and allow it to completely dry. Two tablespoons of vinegar, one tablespoon of lemon juice, and one gallon of water…apply liberally to all exposed areas…and voila! Your Jack-O’-Lantern now has a long-life extension!
Another option to replace the vinegar/lemon juice solution is to simply apply mayonnaise to all exposed areas (cut areas & interior). This does not last quite as long, yet it does extend the life of a Jack-O’-Lantern quite a bit.
Pass this on to your friends!