We use the corrections to the Newton-Einstein secular precessions of the longitudes of the perihelia of the inner planets, phenomenologically estimated E.V. Pitjeva by fitting almost one century of data with the EPM2004 ephemerides, to constrain some long-range models of modified gravity recently put forth to address the dark energy and dark matter problems. They are the four-dimensional ones obtained with the addition of inverse powers and logarithm of some curvature invariants, and the DGP multidimensional braneworld model. After working out the analytical expressions of the secular perihelion precessions induced by the corrections to the Newtonian potential of such models, we compare them to the estimated extra-rates of perihelia by taking their ratio for different pairs of planets instead of using one perihelion at a time for each planet separately, as done so far in literature. The curvature invariants-based models are ruled out, even by rescaling by a factor 10 the errors in the estimated planetary orbital parameters. Less neat is the situation for the DGP model. Only the general relativistic Lense-Thirring effect, not included, as the other exotic models considered here, by Pitjeva in the EPM force models, passes such a test.