Nothing is ever "truly infinite". You always have to either trick the infinity or set an overall limit.
Say if you just keep moving a view, you'll eventually end up with float imprecision at one point.
And if you just keep the character static and move the "background", then you're not really "scrolling", but create an illusion that you are.
If you want an infinite sidescroller, you're probably best off keeping the player centered and dynamically loading and drawing the map as you go.
If you have the same repeating area, you can just render the world the player is in right now and render the same world ahead of behind, but offset so you can just move the world and it looks to the player as infinitely repeating.