The chameleon mechanism appearing in the massive tensor-scalar theory of gravity can effectively reduce locally the nonminimal coupling between the scalar field and matter. This mechanism is invoked to reconcile large-scale departures from general relativity, supposedly accounting for cosmic acceleration, to small-scale stringent constraints on general relativity. In this paper, we carefully investigate this framework on cosmological and solar system scales to derive combined constraints on model parameters, notably by performing a nonambiguous derivation of observables like luminosity distance and local post-Newtonian parameters. The likelihood analysis of type Ia supernovae data and of an admissible domain for the parametrized-post-Newtonian parameters clearly demonstrates that the chameleon mechanism cannot occur in the same region of parameter space as the one necessary to account for cosmic acceleration with the assumed Ratra-Peebles potential and exponential coupling function. © 2012 American Physical Society.