Absorption and fluorescence spectra were measured for metal free (HTSPP) and zinc (ZnTSPP) sulfonated porphyrins in SiO2 and TiO2 matrices produced by the sol-gel technique. These are compared to correspondent data obtained for the two porphyrins in ethanol at different pH values. In the silica medium (acidic), HTSPP is diprotonated and forms aggregates. This effect is found to be reversed on exposure to ammonia vapor and occurs to a much lower degree in titania matrices. This is possibly because of the smaller amount of solvent retained in the pore structure. The main effect of incorporating ZnTSPP in sol-gel-derived matrices is demetallation, although to a lesser extent than in acidic solution.