The quantum Zeno effect describes the inhibition of quantum evolution by frequent measurements. Here, we propose a scheme for entangling two given photons based on this effect. We consider a linear-optics set-up with an absorber medium whose two-photon absorption rate ξ2γ exceeds the one-photon loss rate ξ1γ. In order to reach an error probability Perror, we need ξ1γ/ξ2γ<2Perror2/π2, which is a factor of 64 better than previous approaches (e.g., by Franson et al). Since typical media have ξ2γ<ξ1γ, we discuss three mechanisms for enhancing two-photon absorption as compared to one-photon loss. The first mechanism again employs the quantum Zeno effect via self-interference effects when sending two photons repeatedly through the same absorber. The second mechanism is based on coherent excitations of many atoms and exploits the fact that ξ2γ scales with the number of excitations but ξ1γ does not. The third mechanism envisages three-level systems where the middle level is meta-stable (Λ-system). In this case, ξ1γ is more strongly reduced than ξ2γ and thus it should be possible to achieve ξ2γ/ξ1γ≫1. In conclusion, although our scheme poses challenges regarding the density of active atoms/molecules in the absorber medium, their coupling constants and the detuning, etc., we find that a two-photon gate with an error probability Perror below 25% might be feasible using present-day technology.