Catalyzes an aldol-like condensation reaction between phosphoenolpyruvate (PEP) and D-erythrose 4-phosphate (E4P) to generate 3-deoxy-D-arabino-heptulosonate 7-phosphate (DAH7P) and inorganic phosphate. D-erythrose 4-phosphate + H2O + phosphoenolpyruvate = 7-phospho-2-dehydro-3-deoxy-D-arabino-heptonate + phosphate Binds 1 divalent cation per subunit. The enzyme is active with manganese, cobalt or cadmium ions. Metabolic intermediate biosynthesis; chorismate biosynthesis; chorismate from D-erythrose 4-phosphate and phosphoenolpyruvate: step 1/7. Homodimer (By similarity). Probably interacts with MSMEG_5536. Belongs to the class-II DAHP synthase family.