There is a lot of good advice already mentioned.
If I am going to do some killer-hot hike, I strive to get started extremely early when it is cool. Often I will start with two water bottles, and one is frozen hard as a rock. The second will be frozen mostly. The second one thaws a little by the time you need to drink much, so you will be drinking very cold water. The first one stays frozen for about a half day, so when the second one runs out, the first one has begun to thaw.
We were going to do an "impossible" hike in Death Valley, so we woke up at 2 a.m. and started hiking uphill at 3 a.m. with three quarts of water. Even at that hour, the air temperature was 82 F. Tanking up on cold spring water at the mid-point, we hit the summit of Telescope Peak after about 12-13 hours, with over 11,000 feet of elevation gain. If we hadn't done everything right for heat and hydration, we simply would have died. Also, let Mister Gatorade be your friend. The electrolytes will help your body retain the water and not just pass it through.
I've never had any heat or hydration reaction from taking my statin drugs.