RecruitingDrug trialA Study to Investigate PORT-77 Oral Dosing Compared With Placebo in Participants With Erythropoietic Protoporphyria (EPP) or X-linked Protoporphyria (XLP)PATHWAY is a Phase 2b/3 clinical study with an Open-Label Extension (OLE). It tests PORT-77 in patients with EPP, EPP2, and XLP. The study has three parts: Part 1: Phase 2b * Find the right dose of PORT-77 to lower PPIX levels in the blood * Test if PORT-77 lowers PPIX levels better than placebo * Check the safety of each dose Part 2: Phase 3 * Test if PORT-77 lowers PPIX levels better than placebo * Test if PORT-77 increases the amount of time patients spend in sunlight each day without pain compared to placebo * Check the safety of PORT-77 Part 3: Open-Label Extension (OLE) * Test the long-term effect of PORT-77 on PPIX levels and time in sun * Monitor long-term safety