We report a study of the process γγ→X→η cπ +π -, where X stands for one of the resonances χ c2(1P), η c(2S), X(3872), X(3915), or χ c2(2P). The analysis is performed with a data sample of 473.9fb -1 collected with the BABAR detector at the PEP-II asymmetric-energy electron-positron collider. We do not observe a significant signal for any channel, and calculate 90% confidence-level upper limits on the products of branching fractions and two-photon widths Γ X→γγB(X→η cπ +π -): 15.7eV for χ c2(1P), 133eV for η c(2S), 11.1eV for X(3872) (assuming it to be a spin-2 state), 16eV for X(3915) (assuming it to be a spin-2 state), and 18eV for χ c2(2P). We also report upper limits on the ratios of branching fractions B(η c(2S) →η cπ +π -)/B(η c(2S) →KS0K +π -)<10.0 and B(χ c2(1P) →η cπ +π -) /B(χ c2(1P)→KS0K +π -)<32.9 at the 90%confidence level. © 2012 American Physical Society.