Cats can be weird creatures sometimes, believe me because I have 2 of them! One of them has gone to the bathroom out of the box for various reasons; my other cat (a male) was stinky, she hated scented litter, from stress and anxiety (when there have been changes in her routine), and sometimes because she was mad at me!
First, I can never have anything on the floor for her to pee on - that includes, clothes, towels, linens, paper, magazines, bags, etc. Second, I had to purchase another litter box, I went from 2 to 3. Third, I discovered she hated scented litter so I switched to unscented. Fourth, and final change was to a litter that better removed my male cat's "smell" because he is stinky and SHE hates it.
After all of that, she still has occasional accidents but they are always related to anxiety - my cat is literally mental :)
My cat, Cali, does not have any infections, but that is always the first place to look when your cat has sudden shifts in behaviour. Whatever is bugging your cat, he will continue to potty outside his box until you figure it out.
If you think that it may be caused by stress, you can purchase a product called "feliway". This plugs in much like a glad plug-in, and helps the cat feel calm. I believe it mimics a pheramone that cats emit when calm & happy.
Good luck!