The blaze killed at least 31 and injured at least 21 near Giza, beside the Nile River, officials said.