Originally Posted by RemodelMan
Also make sure that your cuts are straight/90 degrees to the pipe.
You can use a drafting compass along the base of the elbow joint.
Be sure to clean off any burrs and dry fit before you prime and glue on the coupling, pipe and flange.
Minwax, makes a liquid chemical called "Wood Hardener".
Ideally, you could clean up the area with a solution of 1 part bleach to
4 parts water. Allow to dry, then apply the "Wood Hardener". This will significantly reinforce the subfloor around the flange.
You ought to consider installing an extended wax ring, judging by the
moisture around the flange.
The cut doesn't have to be perfect but it has to be pretty good. I clean the burs by just running my fingers around the outside of the pipe. PVC fittings will not go all the way together dry, they need the glue to fully seat. You can hammer them in most of the way dry but it will take quite a bit of work to get them back apart. You can dry fit to get a rough idea but remember it's going to make up a little more. I'd say you're safe going the same length as the piece you cut out.
As for an extended wax ring you can make that call once the flange it down and you see where it sits.