Catalyzes the formation of pyridoxal 5'-phosphate from ribose 5-phosphate (RBP), glyceraldehyde 3-phosphate (G3P) and ammonia. The ammonia is provided by PDX2. Can also use ribulose 5-phosphate and dihydroxyacetone phosphate as substrates, resulting from enzyme-catalyzed isomerization of RBP and G3P, respectively. Also plays an indirect role in resistance to singlet oxygen-generating photosensitizers. aldehydo-D-ribose 5-phosphate + D-glyceraldehyde 3-phosphate + L-glutamine = H(+) + 3 H2O + L-glutamate + phosphate + pyridoxal 5'-phosphate Cofactor biosynthesis; pyridoxal 5'-phosphate biosynthesis. Homodimer or heterodimer with PDX1.1 or PDX1.2. Interacts with PDX2. Expressed in cotyledons, rapidly dividing root stele tissues, stems, leaves, flowers, mature pollen, and siliques. Not induced by cold, salt, drought or UV stress, or by abscisic acid or jasmonic acid. Plants have a lower leaf carotenoid and chlorophyll a and b content, and are impaired both in root cell division and in root cell elongation. Mutant rsr4-1 can be complemented by the addition of any of the vitamin B6 vitamers, except pyridoxal 5'-phosphate. Vitamin B6 is an essential quencher of singlet oxygen in plants, that can protect cellular membranes from lipid peroxidation. Belongs to the PdxS/SNZ family.