We report the detection of OH^+^ and H_2_O^+^ in the z=0.89 absorber toward the lensed quasar PKS 1830-211. The abundance ratio of OH^+^ and H_2_O^+^ is used to quantify the molecular hydrogen fraction (fH2) and the cosmic-ray ionization rate of atomic hydrogen ({dzeta}_H_) along two lines of sight, located at ~2kpc and ~kpc to either side of the absorber's center. The molecular fraction decreases outwards, from ~0.04 to ~0.02, comparable to values measured in the Milky Way at similar galactocentric radii. For {dzeta}_H_, we find values of ~2x10^-14^s^-1^ and ~3x10^-15^s^-1^, respectively, which are slightly higher than in the Milky Way at comparable galactocentric radii, possibly due to a higher average star formation activity in the z=0.89 absorber. The ALMA observations of OH^+^, H_2_O^+^, and other hydrides toward PKS 1830-211 reveal the multi-phase composition of the absorbing gas. Taking the column density ratios along the southwest and northeast lines of sight as a proxy of molecular fraction, we classify the species ArH^+^, OH^+^, H_2_Cl^+^, H_2_O^+^, CH, and HF as tracing gases increasingly more molecular. Incidentally, our data allow us to improve the accuracy of H_2_O^+^ rest frequencies and thus refine the spectroscopic parameters.