Sol-gel-derived optical oxygen, pH and dissolved carbon dioxide