We establish results about the second cohomology with coefficients in the trivial module, symmetric invariant bilinear forms, and derivations of a Lie algebra extended over a commutative associative algebra without unit. These results provide a simple unified approach to a number of questions treated earlier in completely separated ways: periodization of semisimple Lie algebras (Anna Larsson), derivation algebras, with prescribed semisimple part, of nilpotent Lie algebras (Benoist), and presentations of affine Kac-Moody algebras.