The analogue of the paramagnetic to spin-glass phase transition in disordered magnetic systems, leading to the phenomenon of replica symmetry breaking, has been recently demonstrated in a two-dimensional random laser consisting of an organic-based amorphous solid-state thin film. We report here the first demonstration of replica symmetry breaking in a one-dimensional photonic system consisting of an erbium-doped random fiber laser operating in the continuous-wave regime based on a unique random fiber grating system, which plays the role of the random scatterers and operates in the Anderson localization regime. The clear transition from a photonic paramagnetic to a photonic spin glass phase, characterized by the probability distribution function of the Parisi overlap, was verified and characterized. In this unique system, the radiation field interacts only with the gain medium, and the fiber grating, which provides the disordered feedback mechanism, does not interfere with the pump.