Warning: Cannot modify header information – headers already sent by (output started at /home/domain/public_html/file.php:42) in home/domain/public_html/includes/main.php on line 302
The “headers already sent” error is usually caused by having white space before or after the opening and closing PHP tags (<?php . . . ?>).
Remove the additional spaces , this should solve the problem