Suppose that you have a clock and a ruler (which is not rotating with respect to stars) and that you are not accelerating (inertial). Locally (where you are) you will always measure the speed of light at 299792.458 km/sec. However in the presence of gravity if I am at a different location than yours then I could measure the speed of light at your location to be any value smaller than or greater than 299792.458 km/sec. It depends on where I am and where you are (it depends on locations). So in the presence of gravity the speed of light becomes relative (variable depending on the reference frame of the observer). This does not mean that photons accelerate or decelerate; this is just gravity causing clocks to run slower and rulers to shrink.
Einstein's theory of Special Relativity says that the speed of light in vacuum is always measured the same (at 299,792.458 km/s) however this is only true locally for frames that are inertial, which means not accelerating. From Newton's second law: if forces exist implies acceleration exists; this means that if you are in a spaceship and fire your rockets then you are not inertial.
The other factor besides acceleration is gravity. In 1915 (10 years after Special Relativity) Einstein developed another theory called General Relativity that deals with gravitational fields and according to this latest theory the velocity of light appears to vary with the intensity of the gravitational field. For example, an observer outside gravitational fields measures the speed of light locally (in his location) at 299792.458 km/s but when he looks towards a black hole he sees the speed of light there to be as slow as a few meters/sec. At the same time an observer free-falling into that black hole (zero-g) measures the speed of light locally (in his location) at 299792.458 km/s; when he looks towards the black hole he sees the speed of light there much slower; when he looks away from the black hole he sees the speed of light there much faster. If he tries to resist his free-fall into that black hole (by firing his rockets for example) he will not measure the speed of light locally anymore at 299792.458 km/s; instead the stronger the g-force that he feels the faster light appears to him. Again when he looks towards the black hole he sees the speed of light there much slower; when he looks away from the black hole he sees the speed of light there much faster. In any case, free-falling or not, he will never see the speed of light outside gravitational fields at 299792.458 km/s. Finally, there is no difference between the effects of g-forces experienced from these rockets and the effects of g-forces experienced when standing on planets, stars... hence an observer standing on a black hole measures the speed of light locally (in his location) much faster than 299792.458 km/s; when he looks towards outside gravitational fields he sees the speed of light there a zillion km/s.
In the presence of gravity the speed of light becomes relative. To see the steps how Einstein theorized that the measured speed of light in a gravitational field is actually not a constant but rather a variable depending upon the reference frame of the observer: 'On the Influence of Gravitation on the Propagation of Light', Annalen der Physik, 35, 1911. Einstein wrote this paper in 1911 in German (download from: http://www.physik.uni-augsburg.de/annalen/history/einstein-papers/1911_35_898-908.pdf). It predated the full formal development of general relativity by about four years. You can find an English translation of this paper in the Dover book 'The Principle of Relativity' beginning on page 99; you will find in section 3 of that paper Einstein's derivation of the variable speed of light in a gravitational potential, eqn (3). The result is:
Where ϕ is the gravitational potential relative to the point where the speed of light co is measured. Simply put: Light appears to travel slower in stronger gravitational fields (near bigger mass).
You can find a more sophisticated derivation later by Einstein (1955) from the full theory of general relativity in the weak field approximation: 'The Meaning of Relativity', A. Einstein, Princeton University Press (1955). See pages 92-93, eqn (107); the variable velocity of light expressed in coordinates is:
Simply put: Light appears to travel slower near bigger mass (in stronger gravitational fields).
A non-mathematical discussion of this can be found in: 'The Riddle of Gravitation', Peter G. Bergmann, Charles Scribner's Sons, NY (1987). See pages 65-66. Bergmann takes the deflection of light by the gravitational field of a star as evidence of the decreased speed of light in a gravitational field. You can also find modern direct derivations that lead to the same results by Einstein: 'Relativity, Gravitation, and Cosmology', T. Cheng, Oxford University Press (2005).
For the 1911 results see pages 48-49, eqn (3.39):
For the 1955 results but not in coordinates see page 93, eqn (6.28):
Namely the 1955 approximation shows a variation in km/sec twice as much as first predicted in 1911.
Km/sec is a scalar, however gravitational length contraction and time dilation make it impossible to represent the speed of light by a scalar. There is a difference between the radial speed of light and the tangential speed of light. The effects of gravitation can only be accurately represented by a tensor field.
Contrary to Special Relativity, the measured speed of light in a gravitational field is not a constant, but rather a variable depending upon the reference frame of the observer; what one observer sees as true another observer sees as false. The only observers that can actually agree that the speed of light outside gravitational fields is 299792.458 km/s are those who are themselves outside gravitational fields.
Since only in "local inertial frames" does the measured speed of light equals the nominal speed of light (299792.458 km/s) then it becomes important to learn about the types of non-inertial frames:
If you are in a spaceship and fire your rockets then you are not inertial. If you are orbiting the sun then a gravitational force is accelerating you towards the sun; hence you are not inertial either (even if your tangential speed around the sun remains constant). You can find the answer in:
"There are, however, two different types of such [non-inertial] motion; it may for instance be acceleration in a straight line, or circular motion with constant speed. In the first case the magnitude of the velocity vector changes but its direction remains constant, while in the second case the magnitude is constant but the direction changes. In each of these cases the motion is non-inertial, but there is a conceptual distinction to be made."
"General Relativity", Lewis Ryder, Cambridge University Press (2009), pp. 7.
Hence in General Relativity, as long as Earth is orbiting the sun then Earth is a non-inertial frame of reference. Earth can only be a local inertial frame if it exits the solar system, or it enters a gravitational freefall towards the sun (straight in from afar).
Mobirise.com