Stocks post solid gains, and oil prices surge