Garlic can be kept in oil, BUT never try to do so at home !
Regardless of its flavour potency, garlic is a low-acid vegetable. The pH of a clove of garlic typically ranges from 5.3 to 6.3. As with all low-acid vegetables, garlic will support the growth and subsequent toxin production of the bacterium Clostridium botulinum when given the right conditions. These conditions include improper home canning and improper preparation and storage of fresh herb and garlic-in-oil mixtures.
Moisture, room temperature, lack of oxygen, and low-acid conditions all favour the growth of Clostridium botulinum . When growing, this bacterium produces an extremely potent toxin that causes the illness botulism. If untreated, death can result within a few days of consuming the toxic food.
Garlic-in-oil mixtures stored at room temperature provide perfect conditions for producing botulism toxin (low acidity, no free oxygen in the oil, and warm temperatures). The same hazard exists for roasted garlic stored in oil. At least three outbreaks of botulism associated with home-made garlic-in-oil mixtures have been reported in North America since 1980.
Recently, in spring 2003, a case of botulism from canned garlic in oil occurred in Denmark. A 30 year old male ate 4 pieces of garlic and got seriously ill. Fortunately he survived after a 14 day long nearly fatal illness. This was the only case from a large batch of semi-industrially canned garlic produced in Germany. The batch was only heated up to 85¡ãC, which is not high enough to kill C. botulinum spores.