• I am receiving an error message of “WARNING: CANNOT MODIFY HEADER INFORMATION – HEADERS ALREADY SENT BY (OUTPUT STARTED AT” through out my wordpress website each time I use the php code within my page templates of header(‘location:’), example header(‘Location: http://demo.camavision.com/VCSWeb/&#8217;). This code was working fine awhile ago, about a week ago to be exact. I tried shutting off all the plugins, updating the wordpress main source code, even tried going into the source code and fixing it but it just seems that a different line with same message of modify headers pops up… And another one… And another one… and etc. Getting WARNING: CANNOT MODIFY HEADER INFORMATION on multiple lines of the base code. As an example: “WARNING: CANNOT MODIFY HEADER INFORMATION – HEADERS ALREADY SENT BY (OUTPUT STARTED AT C:\WAMP64\WWW\VCSWEB\WP-INCLUDES\FORMATTING.PHP:5084)” Basically too many to fix for the source code, and all I do is just add a php code of header(‘Location: http://demo.camavision.com/VCSWeb/&#8217;) in the template. It all comes down that the main source code from wordpress seems to either have a bunch of spaces or something wrong with the php <?php & ?> coding. Please fix….

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    An awful lot of the cases of this message have to do with either some characters before the opening <?php in a file like functions.php or a template file or a closing ?> with some characters after it. A good practice is to make sure that first <?php is on a line all by itself and do not end .php files with ?>.

    That said….

    This may be a plugin or theme thing. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

Viewing 1 replies (of 1 total)

The topic ‘warning: cannot modify header information’ is closed to new replies.