A search for supersymmetry involving events with at least one photon, one electron or muon, and large missing transverse momentum has been performed by the CMS experiment. The data sample corresponds to an integrated luminosity of 19.7 fb−119.7 fb−1 of pppp collisions at View the MathML sources=8 TeV, produced at the CERN LHC. No excess of events is observed beyond expectations from standard model processes. The result of the search is interpreted in the context of a general model of gauge-mediated supersymmetry breaking, where the charged and neutral winos are the next-to-lightest supersymmetric particles. Within this model, winos with a mass up to 360 GeV are excluded at the 95% confidence level. Two simplified models inspired by gauge-mediated supersymmetry breaking are also examined, and used to derive upper limits on the production cross sections of specific supersymmetric processes.