Inclusion Criteria:  Prior enrollment or co-enrollment in the Longitudinal Study of the Porphyrias (PC Study 7201) with a confirmed diagnosis of EPP or XLP Male or female age ≥15 years at screening Characteristic history of non-blistering cutaneous photosensitivity Onset of prodromal symptoms (burning, tingling, itching, or stinging) within 30 minutes of strong light exposure Willing and capable of giving informed consent and following procedures described in the protocol  Exclusion Criteria:  Participants not willing to expose themselves to light to the point of prodromal symptoms at least weekly History of liver or bone marrow transplant or clinically significant liver dysfunction as determined by the Investigator Known or suspected allergy or intolerance to cimetidine Use of any other experimental therapy in the past 3 months at screening Use of cimetidine within the past 3 months at screening Individuals with elevations of porphyrins in plasma or erythrocytes due to other diseases (i.e., secondary porphyrinemia) such as liver and bone marrow diseases Patients with any clinically significant comorbid conditions, which in the opinion of the Investigator, precludes participation Treatment with any drugs or supplements (Appendix 1) that in the opinion of the Investigator can interfere with subject safety or the objectives of the study The participant either does not have a smartphone or is not willing to use his/her smartphone for the study Women who are pregnant, breastfeeding, or actively planning to become pregnant Individuals with moderate to severe renal insufficiency