The magnetic properties of the pnictide superconductors with the nominal composition of BaFe2(As0.68P0.32)2 and EuFe2(As0.8P0.2)2 were studied by 57Fe Mössbauer spectroscopy. A superconducting transition at 30K was detected and coexistence of magnetism and superconductivity at low temperatures was observed. The Mössbauer spectra show two iron-atom surroundings, which are attributed to undoped AFe2As2 and substituted AFe2(As1−xPx)2, with at least one phosphorus atom in the tetragonal iron environment, (A = Ba or Eu). These two iron-atom surroundings were attributed to one macroscopic AFe2(As1−xPx)2 phase.