1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Error: "Warning: Unknown(): A session is active. You cannot change the session"
In this case, the directive isn't accepted because it has to be executed before the session is active. You therefore need to move the ini_set call to before the session's creation.
Link to this FAQ: